]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
1 <?xml version="1.0" encoding="utf-8"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom="http://www.w3.org/2005/Atom">
3 <channel>
4 <title>Petter Reinholdtsen</title>
5 <description></description>
6 <link>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" />
8
9 <item>
10 <title>45 orphaned Debian packages moved to git, 391 to go</title>
11 <link>https://people.skolelinux.org/pere/blog/45_orphaned_Debian_packages_moved_to_git__391_to_go.html</link>
12 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/45_orphaned_Debian_packages_moved_to_git__391_to_go.html</guid>
13 <pubDate>Thu, 25 Apr 2024 22:00:00 +0200</pubDate>
14 <description>&lt;p&gt;Nine days ago, I started migrating orphaned Debian packages with no
15 version control system listed in debian/control of the source to git.
16 At the time there were 438 such packages. Now there are 391,
17 according to the UDD. In reality it is slightly less, as there is a
18 delay between uploads and UDD updates. In the nine days since, I have
19 thus been able to work my way through ten percent of the packages. I
20 am starting to run out of steam, and hope someone else will also help
21 brushing some dust of these packages. Here is a recipe how to do it.
22
23 I start by picking a random package by querying the UDD for a list of
24 10 random packages from the set of remaining packages:
25
26 &lt;blockquote&gt;&lt;pre&gt;
27 PGPASSWORD=&quot;udd-mirror&quot; psql --port=5432 --host=udd-mirror.debian.net \
28 --username=udd-mirror udd -c &quot;select source from sources \
29 where release = &#39;sid&#39; and (vcs_url ilike &#39;%anonscm.debian.org%&#39; \
30 OR vcs_browser ilike &#39;%anonscm.debian.org%&#39; or vcs_url IS NULL \
31 OR vcs_browser IS NULL) AND maintainer ilike &#39;%packages@qa.debian.org%&#39; \
32 order by random() limit 10;&quot;
33 &lt;/pre&gt;&lt;/blockquote&gt;
34
35 &lt;p&gt;Next, I visit http://salsa.debian.org/debian and search for the
36 package name, to ensure no git repository already exist. If it does,
37 I clone it and try to get it to an uploadable state, and add the Vcs-*
38 entries in d/control to make the repository more widely known. These
39 packages are a minority, so I will not cover that use case here.&lt;/p&gt;
40
41 &lt;p&gt;For packages without an existing git repository, I run the
42 following script &lt;tt&gt;debian-snap-to-salsa&lt;/tt&gt; to prepare a git
43 repository with the existing packaging.&lt;/p&gt;
44
45 &lt;blockquote&gt;&lt;pre&gt;
46 #!/bin/sh
47 #
48 # See also https://bugs.debian.org/804722#31
49
50 set -e
51
52 # Move to this Standards-Version.
53 SV_LATEST=4.7.0
54
55 PKG=&quot;$1&quot;
56
57 if [ -z &quot;$PKG&quot; ]; then
58 echo &quot;usage: $0 &lt;pkgname&gt;&quot;
59 exit 1
60 fi
61
62 if [ -e &quot;${PKG}-salsa&quot; ]; then
63 echo &quot;error: ${PKG}-salsa already exist, aborting.&quot;
64 exit 1
65 fi
66
67 if [ -z &quot;ALLOWFAILURE&quot; ] ; then
68 ALLOWFAILURE=false
69 fi
70
71 # Fetch every snapshotted source package. Manually loop until all
72 # transfers succeed, as &#39;gbp import-dscs --debsnap&#39; do not fail on
73 # download failures.
74 until debsnap --force -v $PKG || $ALLOWFAILURE ; do sleep 1; done
75 mkdir ${PKG}-salsa; cd ${PKG}-salsa
76 git init
77
78 # Specify branches to override any debian/gbp.conf file present in the
79 # source package.
80 gbp import-dscs --debian-branch=master --upstream-branch=upstream \
81 --pristine-tar ../source-$PKG/*.dsc
82
83 # Add Vcs pointing to Salsa Debian project (must be manually created
84 # and pushed to).
85 if ! grep -q ^Vcs- debian/control ; then
86 awk &quot;BEGIN { s=1 } /^\$/ { if (s==1) { print \&quot;Vcs-Browser: https://salsa.debian.org/debian/$PKG\&quot;; print \&quot;Vcs-Git: https://salsa.debian.org/debian/$PKG.git\&quot; }; s=0 } { print }&quot; &lt; debian/control &gt; debian/control.new &amp;&amp; mv debian/control.new debian/control
87 git commit -m &quot;Updated vcs in d/control to Salsa.&quot; debian/control
88 fi
89
90 # Tell gbp to enforce the use of pristine-tar.
91 inifile +inifile debian/gbp.conf +create +section DEFAULT +key pristine-tar +value True
92 git add debian/gbp.conf
93 git commit -m &quot;Added d/gbp.conf to enforce the use of pristine-tar.&quot; debian/gbp.conf
94
95 # Update to latest Standards-Version.
96 SV=&quot;$(grep ^Standards-Version: debian/control|awk &#39;{print $2}&#39;)&quot;
97 if [ $SV_LATEST != $SV ]; then
98 sed -i &quot;s/\(Standards-Version: \)\(.*\)/\1$SV_LATEST/&quot; debian/control
99 git commit -m &quot;Updated Standards-Version from $SV to $SV_LATEST.&quot; debian/control
100 fi
101
102 if grep -q pkg-config debian/control; then
103 sed -i s/pkg-config/pkgconf/ debian/control
104 git commit -m &quot;Replaced obsolete pkg-config build dependency with pkgconf.&quot; debian/control
105 fi
106
107 if grep -q libncurses5-dev debian/control; then
108 sed -i s/libncurses5-dev/libncurses-dev/ debian/control
109 git commit -m &quot;Replaced obsolete libncurses5-dev build dependency with libncurses-dev.&quot; debian/control
110 fi
111 &lt;/pre&gt;&lt;/blockquote&gt;
112
113 Some times the debsnap script fail to download some of the versions.
114 In those cases I investigate, and if I decide the failing versions
115 will not be missed, I call it using ALLOWFAILURE=true to ignore the
116 problem and create the git repository anyway.&lt;/p&gt;
117
118 &lt;p&gt;With the git repository in place, I do a test build (gbp
119 buildpackage) to ensure the build is actually working. If it does not
120 I pick a different package, or if the build failure is trivial to fix,
121 I fix it before continuing. At this stage I revisit
122 http://salsa.debian.org/debian and create the project under this group
123 for the package. I then follow the instructions to publish the local
124 git repository. Here is from a recent example:&lt;/p&gt;
125
126 &lt;blockquote&gt;&lt;pre&gt;
127 git remote add origin git@salsa.debian.org:debian/perl-byacc.git
128 git push --set-upstream origin master upstream pristine-tar
129 git push --tags
130 &lt;/pre&gt;&lt;/blockquote&gt;
131
132 &lt;p&gt;With a working build, I have a look at the build rules if I want to
133 remove some more dust. I normally try to move to debhelper compat
134 level 13, which involves removing debian/compat and modifying
135 debian/control to build depend on debhelper-compat (=13). I also test
136 with &#39;Rules-Requires-Root: no&#39; in debian/control and verify in
137 debian/rules that hardening is enabled, and include all of these if
138 the package still build. If it fail to build with level 13, I try
139 with 12, 11, 10 and so on until I find a level where it build, as I do
140 not want to spend a lot of time fixing build issues.&lt;/p&gt;
141
142 &lt;p&gt;Some times, when I feel inspired, I make sure debian/copyright is
143 converted to the machine readable format, often by starting with
144 &#39;debhelper -cc&#39; and then cleaning up the autogenerated content until
145 it matches realities. If I feel like it, I might also clean up
146 non-dh-based debian/rules files to use the short style dh build
147 rules.&lt;/p&gt;
148
149 &lt;p&gt;Once I have removed all the dust I care to process for the package,
150 I run &#39;gbp dch&#39; to generate a debian/changelog entry based on the
151 commits done so far, run &#39;dch -r&#39; to switch from &#39;UNRELEASED&#39; to
152 &#39;unstable&#39; and get an editor to make sure the &#39;QA upload&#39; marker is in
153 place and that all long commit descriptions are wrapped into sensible
154 lengths, run &#39;debcommit --release -a&#39; to commit and tag the new
155 debian/changelog entry, run &#39;debuild -S&#39; to build a source only
156 package, and &#39;dput ../perl-byacc_2.0-10_source.changes&#39; to do the
157 upload. During the entire process, and many times per step, I run
158 &#39;debuild&#39; to verify the changes done still work. I also some times
159 verify the set of built files using &#39;find debian&#39; to see if I can spot
160 any problems (like no file in usr/bin any more or empty package). I
161 also try to fix all lintian issues reported at the end of each
162 &#39;debuild&#39; run.&lt;/p&gt;
163
164 &lt;p&gt;If I find Debian specific patches, I try to ensure their metadata
165 is fairly up to date and some times I even try to reach out to
166 upstream, to make the upstream project aware of the patches. Most of
167 my emails bounce, so the success rate is low. For projects with no
168 Homepage entry in debian/control I try to track down one, and for
169 packages with no debian/watch file I try to create one. But at least
170 for some of the packages I have been unable to find a functioning
171 upstream, and must skip both of these.&lt;/p&gt;
172
173 &lt;p&gt;If I could handle ten percent in nine days, twenty people could
174 complete the rest in less then five days. I use approximately twenty
175 minutes per package, when I have twenty minutes spare time to spend.
176 Perhaps you got twenty minutes to spare too?&lt;/p&gt;
177
178 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
179 activities, please send Bitcoin donations to my address
180 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
181 </description>
182 </item>
183
184 <item>
185 <title>RAID status from LSI Megaraid controllers in Debian</title>
186 <link>https://people.skolelinux.org/pere/blog/RAID_status_from_LSI_Megaraid_controllers_in_Debian.html</link>
187 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/RAID_status_from_LSI_Megaraid_controllers_in_Debian.html</guid>
188 <pubDate>Wed, 17 Apr 2024 17:00:00 +0200</pubDate>
189 <description>&lt;p&gt;I am happy to report that
190 &lt;a href=&quot;https://github.com/namiltd/megactl&quot;&gt;the megactl package&lt;/a&gt;,
191 useful to fetch RAID status when using the LSI Megaraid controller,
192 now is available in Debian. It passed NEW a few days ago, and is now
193 &lt;a href=&quot;https://tracker.debian.org/pkg/megactl&quot;&gt;available in
194 unstable&lt;/a&gt;, and probably showing up in testing in a weeks time. The
195 new version should provide Appstream hardware mapping and should
196 integrate nicely with isenkram.&lt;/p&gt;
197
198 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
199 activities, please send Bitcoin donations to my address
200 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
201
202 </description>
203 </item>
204
205 <item>
206 <title>Time to move orphaned Debian packages to git</title>
207 <link>https://people.skolelinux.org/pere/blog/Time_to_move_orphaned_Debian_packages_to_git.html</link>
208 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Time_to_move_orphaned_Debian_packages_to_git.html</guid>
209 <pubDate>Sun, 14 Apr 2024 09:30:00 +0200</pubDate>
210 <description>&lt;p&gt;There are several packages in Debian without a associated git
211 repository with the packaging history. This is unfortunate and it
212 would be nice if more of these would do so. Quote a lot of these are
213 without a maintainer, ie listed as maintained by the
214 &#39;&lt;a href=&quot;https://qa.debian.org/developer.php?email=packages%40qa.debian.org&quot;&gt;Debian
215 QA Group&lt;/a&gt;&#39; place holder. In fact, 438 packages have this property
216 according to UDD (&lt;tt&gt;SELECT source FROM sources WHERE release = &#39;sid&#39;
217 AND (vcs_url ilike &#39;%anonscm.debian.org%&#39; OR vcs_browser ilike
218 &#39;%anonscm.debian.org%&#39; or vcs_url IS NULL OR vcs_browser IS NULL) AND
219 maintainer ilike &#39;%packages@qa.debian.org%&#39;;&lt;/tt&gt;). Such packages can
220 be updated without much coordination by any Debian developer, as they
221 are considered orphaned.&lt;/p&gt;
222
223 &lt;p&gt;To try to improve the situation and reduce the number of packages
224 without associated git repository, I started a few days ago to search
225 out candiates and provide them with a git repository under the
226 &#39;debian&#39; collaborative Salsa project. I started with the packages
227 pointing to obsolete Alioth git repositories, and am now working my
228 way across the ones completely without git references. In addition to
229 updating the Vcs-* debian/control fields, I try to update
230 Standards-Version, debhelper compat level, simplify d/rules, switch to
231 Rules-Requires-Root: no and fix lintian issues reported. I only
232 implement those that are trivial to fix, to avoid spending too much
233 time on each orphaned package. So far my experience is that it take
234 aproximately 20 minutes to convert a package without any git
235 references, and a lot more for packages with existing git repositories
236 incompatible with git-buildpackages.&lt;/p&gt;
237
238 &lt;p&gt;So far I have converted 10 packages, and I will keep going until I
239 run out of steam. As should be clear from the numbers, there is
240 enough packages remaining for more people to do the same without
241 stepping on each others toes. I find it useful to start by searching
242 for a git repo already on salsa, as I find that some times a git repo
243 has already been created, but no new version is uploaded to Debian
244 yet. In those cases I start with the existing git repository. I
245 convert to the git-buildpackage+pristine-tar workflow, and ensure a
246 debian/gbp.conf file with &quot;pristine-tar=True&quot; is added early, to avoid
247 uploading a orig.tar.gz with the wrong checksum by mistake. Did that
248 three times in the begin before I remembered my mistake.&lt;/p&gt;
249
250 &lt;p&gt;So, if you are a Debian Developer and got some spare time, perhaps
251 considering migrating some orphaned packages to git?&lt;/p&gt;
252
253 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
254 activities, please send Bitcoin donations to my address
255 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
256 </description>
257 </item>
258
259 <item>
260 <title>Plain text accounting file from your bitcoin transactions</title>
261 <link>https://people.skolelinux.org/pere/blog/Plain_text_accounting_file_from_your_bitcoin_transactions.html</link>
262 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Plain_text_accounting_file_from_your_bitcoin_transactions.html</guid>
263 <pubDate>Thu, 7 Mar 2024 18:00:00 +0100</pubDate>
264 <description>&lt;p&gt;A while back I wrote a small script to extract the Bitcoin
265 transactions in a wallet in the
266 &lt;ahref=&quot;https://plaintextaccounting.org/&quot;&gt;ledger plain text accounting
267 format&lt;/a&gt;. The last few days I spent some time to get it working
268 better with more special cases. In case it can be useful for others,
269 here is a copy:&lt;/p&gt;
270
271 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
272 #!/usr/bin/python3
273 # -*- coding: utf-8 -*-
274 # Copyright (c) 2023-2024 Petter Reinholdtsen
275
276 from decimal import Decimal
277 import json
278 import subprocess
279 import time
280
281 import numpy
282
283 def format_float(num):
284 return numpy.format_float_positional(num, trim=&#39;-&#39;)
285
286 accounts = {
287 u&#39;amount&#39; : &#39;Assets:BTC:main&#39;,
288 }
289
290 addresses = {
291 &#39;&lt;some address&gt;&#39; : &#39;Assets:bankkonto&#39;,
292 &#39;&lt;some address&gt;&#39; : &#39;Assets:bankkonto&#39;,
293 }
294
295 def exec_json(cmd):
296 proc = subprocess.Popen(cmd,stdout=subprocess.PIPE)
297 j = json.loads(proc.communicate()[0], parse_float=Decimal)
298 return j
299
300 def list_txs():
301 # get all transactions for all accounts / addresses
302 c = 0
303 txs = []
304 txidfee = {}
305 limit=100000
306 cmd = [&#39;bitcoin-cli&#39;, &#39;listtransactions&#39;, &#39;*&#39;, str(limit)]
307 if True:
308 txs.extend(exec_json(cmd))
309 else:
310 # Useful for debugging
311 with open(&#39;transactions.json&#39;) as f:
312 txs.extend(json.load(f, parse_float=Decimal))
313 #print txs
314 for tx in sorted(txs, key=lambda a: a[&#39;time&#39;]):
315 # print tx[&#39;category&#39;]
316 if &#39;abandoned&#39; in tx and tx[&#39;abandoned&#39;]:
317 continue
318 if &#39;confirmations&#39; in tx and 0 &gt;= tx[&#39;confirmations&#39;]:
319 continue
320 when = time.strftime(&#39;%Y-%m-%d %H:%M&#39;, time.localtime(tx[&#39;time&#39;]))
321 if &#39;message&#39; in tx:
322 desc = tx[&#39;message&#39;]
323 elif &#39;comment&#39; in tx:
324 desc = tx[&#39;comment&#39;]
325 elif &#39;label&#39; in tx:
326 desc = tx[&#39;label&#39;]
327 else:
328 desc = &#39;n/a&#39;
329 print(&quot;%s %s&quot; % (when, desc))
330 if &#39;address&#39; in tx:
331 print(&quot; ; to bitcoin address %s&quot; % tx[&#39;address&#39;])
332 else:
333 print(&quot; ; missing address in transaction, txid=%s&quot; % tx[&#39;txid&#39;])
334 print(f&quot; ; amount={tx[&#39;amount&#39;]}&quot;)
335 if &#39;fee&#39;in tx:
336 print(f&quot; ; fee={tx[&#39;fee&#39;]}&quot;)
337 for f in accounts.keys():
338 if f in tx and Decimal(0) != tx[f]:
339 amount = tx[f]
340 print(&quot; %-20s %s BTC&quot; % (accounts[f], format_float(amount)))
341 if &#39;fee&#39; in tx and Decimal(0) != tx[&#39;fee&#39;]:
342 # Make sure to list fee used in several transactions only once.
343 if &#39;fee&#39; in tx and tx[&#39;txid&#39;] in txidfee \
344 and tx[&#39;fee&#39;] == txidfee[tx[&#39;txid&#39;]]:
345 True
346 else:
347 fee = tx[&#39;fee&#39;]
348 print(&quot; %-20s %s BTC&quot; % (accounts[&#39;amount&#39;], format_float(fee)))
349 print(&quot; %-20s %s BTC&quot; % (&#39;Expences:BTC-fee&#39;, format_float(-fee)))
350 txidfee[tx[&#39;txid&#39;]] = tx[&#39;fee&#39;]
351
352 if &#39;address&#39; in tx and tx[&#39;address&#39;] in addresses:
353 print(&quot; %s&quot; % addresses[tx[&#39;address&#39;]])
354 else:
355 if &#39;generate&#39; == tx[&#39;category&#39;]:
356 print(&quot; Income:BTC-mining&quot;)
357 else:
358 if amount &lt; Decimal(0):
359 print(f&quot; Assets:unknown:sent:update-script-addr-{tx[&#39;address&#39;]}&quot;)
360 else:
361 print(f&quot; Assets:unknown:received:update-script-addr-{tx[&#39;address&#39;]}&quot;)
362
363 print()
364 c = c + 1
365 print(&quot;# Found %d transactions&quot; % c)
366 if limit == c:
367 print(f&quot;# Warning: Limit {limit} reached, consider increasing limit.&quot;)
368
369 def main():
370 list_txs()
371
372 main()
373 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
374
375 &lt;p&gt;It is more of a proof of concept, and I do not expect it to handle
376 all edge cases, but it worked for me, and perhaps you can find it
377 useful too.&lt;/p&gt;
378
379 &lt;p&gt;To get a more interesting result, it is useful to map accounts sent
380 to or received from to accounting accounts, using the
381 &lt;tt&gt;addresses&lt;/tt&gt; hash. As these will be very context dependent, I
382 leave out my list to allow each user to fill out their own list of
383 accounts. Out of the box, &#39;ledger reg BTC:main&#39; should be able to
384 show the amount of BTCs present in the wallet at any given time in the
385 past. For other and more valuable analysis, a account plan need to be
386 set up in the &lt;tt&gt;addresses&lt;/tt&gt; hash. Here is an example
387 transaction:&lt;/p&gt;
388
389 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
390 2024-03-07 17:00 Donated to good cause
391 Assets:BTC:main -0.1 BTC
392 Assets:BTC:main -0.00001 BTC
393 Expences:BTC-fee 0.00001 BTC
394 Expences:donations 0.1 BTC
395 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
396
397 &lt;p&gt;It need a running Bitcoin Core daemon running, as it connect to it
398 using &lt;tt&gt;bitcoin-cli listtransactions * 100000&lt;/tt&gt; to extract the
399 transactions listed in the Wallet.&lt;/p&gt;
400
401 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
402 activities, please send Bitcoin donations to my address
403 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
404 </description>
405 </item>
406
407 <item>
408 <title>RAID status from LSI Megaraid controllers using free software</title>
409 <link>https://people.skolelinux.org/pere/blog/RAID_status_from_LSI_Megaraid_controllers_using_free_software.html</link>
410 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/RAID_status_from_LSI_Megaraid_controllers_using_free_software.html</guid>
411 <pubDate>Sun, 3 Mar 2024 22:40:00 +0100</pubDate>
412 <description>&lt;p&gt;The last few days I have revisited RAID setup using the LSI
413 Megaraid controller. These are a family of controllers called PERC by
414 Dell, and is present in several old PowerEdge servers, and I recently
415 got my hands on one of these. I had forgotten how to handle this RAID
416 controller in Debian, so I had to take a peek in the
417 &lt;a href=&quot;https://wiki.debian.org/LinuxRaidForAdmins&quot;&gt;Debian wiki page
418 &quot;Linux and Hardware RAID: an administrator&#39;s summary&quot;&lt;/a&gt; to remember
419 what kind of software is available to configure and monitor the disks
420 and controller. I prefer Free Software alternatives to proprietary
421 tools, as the later tend to fall into disarray once the manufacturer
422 loose interest, and often do not work with newer Linux Distributions.
423 Sadly there is no free software tool to configure the RAID setup, only
424 to monitor it. RAID can provide improved reliability and resilience in
425 a storage solution, but only if it is being regularly checked and any
426 broken disks are being replaced in time. I thus want to ensure some
427 automatic monitoring is available.&lt;/p&gt;
428
429 &lt;p&gt;In the discovery process, I came across a old free software tool to
430 monitor PERC2, PERC3, PERC4 and PERC5 controllers, which to my
431 surprise is not present in debian. To help change that I created a
432 &lt;a href=&quot;https://bugs.debian.org/1065322&quot;&gt;request for packaging of the
433 megactl package&lt;/a&gt;, and tried to track down a usable version.
434 &lt;a href=&quot;https://sourceforge.net/p/megactl/&quot;&gt;The original project
435 site&lt;/a&gt; is on Sourceforge, but as far as I can tell that project has
436 been dead for more than 15 years. I managed to find a
437 &lt;a href=&quot;https://github.com/hmage/megactl&quot;&gt;more recent fork on
438 github&lt;/a&gt; from user hmage, but it is unclear to me if this is still
439 being maintained. It has not seen much improvements since 2016. A
440 &lt;a href=&quot;https://github.com/namiltd/megactl&quot;&gt;more up to date
441 edition&lt;/a&gt; is a git fork from the original github fork by user
442 namiltd, and this newer fork seem a lot more promising. The owner of
443 this github repository has replied to change proposals within hours,
444 and had already added some improvements and support for more hardware.
445 Sadly he is reluctant to commit to maintaining the tool and stated in
446 &lt;a href=&quot;https://github.com/namiltd/megactl/pull/1&quot;&gt;my first pull
447 request&lt;/A&gt; that he think a new release should be made based on the
448 git repository owned by hmage. I perfectly understand this
449 reluctance, as I feel the same about maintaining yet another package
450 in Debian when I barely have time to take care of the ones I already
451 maintain, but do not really have high hopes that hmage will have time
452 to spend on it and hope namiltd will change his mind.&lt;/p&gt;
453
454 &lt;p&gt;In any case, I created
455 &lt;a href=&quot;https://salsa.debian.org/debian/megactl&quot;&gt;a draft package&lt;/a&gt;
456 based on the namiltd edition and put it under the debian group on
457 salsa.debian.org. If you own a Dell PowerEdge server with one of the
458 PERC controllers, or any other RAID controller using the megaraid or
459 megaraid_sas Linux kernel modules, you might want to check it out. If
460 enough people are interested, perhaps the package will make it into
461 the Debian archive.&lt;/p&gt;
462
463 &lt;p&gt;There are two tools provided, megactl for the megaraid Linux kernel
464 module, and megasasctl for the megaraid_sas Linux kernel module. The
465 simple output from the command on one of my machines look like this
466 (yes, I know some of the disks have problems. :).&lt;/p&gt;
467
468 &lt;pre&gt;
469 # megasasctl
470 a0 PERC H730 Mini encl:1 ldrv:2 batt:good
471 a0d0 558GiB RAID 1 1x2 optimal
472 a0d1 3067GiB RAID 0 1x11 optimal
473 a0e32s0 558GiB a0d0 online errs: media:0 other:19
474 a0e32s1 279GiB a0d1 online
475 a0e32s2 279GiB a0d1 online
476 a0e32s3 279GiB a0d1 online
477 a0e32s4 279GiB a0d1 online
478 a0e32s5 279GiB a0d1 online
479 a0e32s6 279GiB a0d1 online
480 a0e32s8 558GiB a0d0 online errs: media:0 other:17
481 a0e32s9 279GiB a0d1 online
482 a0e32s10 279GiB a0d1 online
483 a0e32s11 279GiB a0d1 online
484 a0e32s12 279GiB a0d1 online
485 a0e32s13 279GiB a0d1 online
486
487 #
488 &lt;/pre&gt;
489
490 &lt;p&gt;In addition to displaying a simple status report, it can also test
491 individual drives and print the various event logs. Perhaps you too
492 find it useful?&lt;/p&gt;
493
494 &lt;p&gt;In the packaging process I provided some patches upstream to
495 improve installation and ensure
496 &lt;ahref=&quot;https://github.com/namiltd/megactl/pull/2&quot;&gt;a Appstream
497 metainfo file is provided&lt;/a&gt; to list all supported HW, to allow
498 &lt;a href=&quot;https://tracker.debian.org/isenkram&quot;&gt;isenkram&lt;/a&gt; to propose
499 the package on all servers with a relevant PCI card.&lt;/p&gt;
500
501 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
502 activities, please send Bitcoin donations to my address
503 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
504
505 </description>
506 </item>
507
508 <item>
509 <title>Frokostseminar om Noark 5 i Oslo tirsdag 2024-03-12</title>
510 <link>https://people.skolelinux.org/pere/blog/Frokostseminar_om_Noark_5_i_Oslo_tirsdag_2024_03_12.html</link>
511 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Frokostseminar_om_Noark_5_i_Oslo_tirsdag_2024_03_12.html</guid>
512 <pubDate>Tue, 27 Feb 2024 15:15:00 +0100</pubDate>
513 <description>&lt;p&gt;Nikita-prosjektet, der jeg er involvert, inviterer i samarbeid med
514 Oslo Byarkiv, forskningsgruppen METAINFO og foreningen NUUG, til et
515 frokostseminar om Noark 5 og Noark 5 Tjenestegrensesnitt tirsdag
516 2024-03-12. Seminaret finner sted ved Oslo byarkiv. Vi håper å få
517 til videostrømming via Internett av presentasjoner og paneldiskusjon.
518 Oppdatert program og lenker til påmeldingsskjema er
519 &lt;a href=&quot;https://noark.codeberg.page/noark5-seminars/2023-03-12-noark-workshop.html&quot;&gt;tilgjengelig
520 fra Nikita-prosjektet&lt;/a&gt;. Arrangementet er gratis.
521
522 &lt;p&gt;Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
523 det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
524 til min adresse
525 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;. Merk,
526 betaling med bitcoin er ikke anonymt. :)&lt;/p&gt;
527 </description>
528 </item>
529
530 <item>
531 <title>Welcome out of prison, Mickey, hope you find some freedom!</title>
532 <link>https://people.skolelinux.org/pere/blog/Welcome_out_of_prison__Mickey__hope_you_find_some_freedom_.html</link>
533 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/Welcome_out_of_prison__Mickey__hope_you_find_some_freedom_.html</guid>
534 <pubDate>Mon, 1 Jan 2024 21:00:00 +0100</pubDate>
535 <description>&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;https://people.skolelinux.org/pere/blog/images/2024-01-01-mikke-verk-i-det-fri.jpeg&quot;/&gt;&lt;/p&gt;
536
537 &lt;p&gt;Today, the animation figure Mickey Mouse finally was released from
538 the corporate copyright prison, as the 1928 movie
539 &lt;a href=&quot;https://en.wikipedia.org/wiki/Steamboat_Willie&quot;&gt;Steamboat
540 Willie&lt;/a&gt; entered the public domain in USA. This movie was the first
541 public appearance of Mickey Mouse. Sadly the figure is still on
542 probation, thanks to trademark laws and a the Disney corporations
543 powerful pack of lawyers, as described in the 2017 article
544 in &lt;a href=&quot;https://priceonomics.com/how-mickey-mouse-evades-the-public-domain/&quot;&gt;&quot;How
545 Mickey Mouse Evades the Public Domain&quot;&lt;/a&gt; from Priceonomics. On the
546 positive side, the primary driver for repeated extentions of the
547 duration of copyright has been Disney thanks to Mickey Mouse and the
548 2028 movie, and as it now in the public domain I hope it will cause
549 less urge to extend the already unreasonable long copyright
550 duration.&lt;/p&gt;
551
552 &lt;p&gt;The first book I published, the 2004 book &lt;a
553 href=&quot;https://free-culture.cc/&quot;&gt;&quot;Free Culture&quot; by Lawrence Lessig&lt;/a&gt;,
554 published 2015 in
555 &lt;a href=&quot;https://people.skolelinux.org/pere/publisher/#frikultur&quot;&gt;English,
556 French and Norwegian Bokmål&lt;/a&gt;, touch on the story of Disney pushed
557 for extending the copyright duration in USA. It is a great book
558 explaining problems with the current copyright regime and why we need
559 Creative Commons movement, and I strongly recommend everyone to read
560 it.&lt;/p&gt;
561
562 &lt;p&gt;This movie (with
563 &lt;a href=&quot;https://www.imdb.com/title/tt0019422/&quot;&gt;IMDB ID tt0019422&lt;/a&gt;)
564 is now available from the Internet Archive. Two copies have been
565 uploaded so far, one uploaded
566 &lt;a href=&quot;https://archive.org/details/SteamboatWillie&quot;&gt;2015-11-04&lt;/a&gt;
567 (&lt;a href=&quot;https://archive.org/download/SteamboatWillie/SteamboatWillie_archive.torrent&quot;&gt;torrent&lt;/a&gt;)
568 and the other
569 &lt;a href=&quot;https://archive.org/details/steamboat-willie-mickey&quot;&gt;2023-01-01&lt;/a&gt;
570 (&lt;a href=&quot;https://archive.org/download/steamboat-willie-mickey/steamboat-willie-mickey_archive.torrent&quot;&gt;torrent&lt;/a&gt;) - see
571 &lt;a href=&quot;https://people.skolelinux.org/pere/blog/VLC_bittorrent_plugin_still_going_strong__new_upload_2_14_4.html&quot;&gt;VLC
572 bittorrent plugin&lt;/a&gt; for streaming the video using the torrent link.
573 I am very happy to see
574 &lt;a href=&quot;https://people.skolelinux.org/pere/blog/Legal_to_share_more_than_16_000_movies_listed_on_IMDB_.html&quot;&gt;the
575 number of public domain movies&lt;/a&gt; increasing. I look forward to
576 when those are the majority. Perhaps it will reduce the urge of the
577 copyright industry to control its customers.&lt;/p&gt;
578
579 &lt;p&gt;A more
580 &lt;a href=&quot;https://publicdomainreview.org/features/entering-the-public-domain/2024/&quot;&gt;comprehensive
581 list of works entering the public domain in 2024&lt;/a&gt; is available from
582 the Public Domain Review.&lt;/p&gt;
583
584 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
585 activities, please send Bitcoin donations to my address
586 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
587 </description>
588 </item>
589
590 <item>
591 <title>VLC bittorrent plugin still going strong, new upload 2.14-4</title>
592 <link>https://people.skolelinux.org/pere/blog/VLC_bittorrent_plugin_still_going_strong__new_upload_2_14_4.html</link>
593 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/VLC_bittorrent_plugin_still_going_strong__new_upload_2_14_4.html</guid>
594 <pubDate>Sun, 31 Dec 2023 10:45:00 +0100</pubDate>
595 <description>&lt;p&gt;The other day I uploaded a new version of
596 &lt;a href=&quot;https://tracker.debian.org/pkg/vlc-plugin-bittorrent&quot;&gt;the VLC
597 bittorrent plugin&lt;/a&gt; to Debian, version 2.14-4, to fix a few
598 packaging issues. This plugin extend VLC allowing it to stream videos
599 directly from a bittorrent source using both torrent files and magnet
600 links, as easy as using a HTTP or local file source. I believe such
601 protocol support is a vital feature in VLC, allowing efficient
602 streaming from sources such at the 11 million movies in
603 &lt;a href=&quot;https://archive.org/&quot;&gt;the Internet Archive&lt;/a&gt;. Bittorrent is
604 one of the most efficient content distribution protocols on the
605 Internet, without centralised control, and should be used more.&lt;/p&gt;
606
607 &lt;p&gt;The new version is now both in Debian Unstable and Testing, as well
608 as Ubuntu. While looking after the package, I decided to ask the VLC
609 upstream community if there was any hope to get Bittorrent support
610 into the official VLC program, and was very happy to learn that
611 someone is already working on it. I hope we can see some fruits of
612 that labour next year, but do not hold my breath. In the mean time we
613 can use the plugin, which is already
614 &lt;a href=&quot;https://qa.debian.org/popcon.php?package=vlc-plugin-bittorrent&quot;&gt;installed
615 by 0.23 percent of the Debian population&lt;/a&gt; according to
616 popularity-contest. It could use a new upstream release, and I hope
617 the upstream developer soon find time to polish it even more.&lt;/p&gt;
618
619 &lt;p&gt;It is worth noting that the plugin store the downloaded files in
620 &lt;tt&gt;~/Downloads/vlc-bittorrent/&lt;/tt&gt;, which can quickly fill up the
621 user home directory during use. Users of the plugin should keep an
622 eye with disk usage when streaming a bittorrent source.&lt;/p&gt;
623
624 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
625 activities, please send Bitcoin donations to my address
626 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
627 </description>
628 </item>
629
630 <item>
631 <title>«Når «på» blir «pÃ¥»: Et reservoar av tegn sett fra depotet» i tidsskriftet Aksess</title>
632 <link>https://people.skolelinux.org/pere/blog/_N_r__p___blir__p_____Et_reservoar_av_tegn_sett_fra_depotet__i_tidsskriftet_Aksess.html</link>
633 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/_N_r__p___blir__p_____Et_reservoar_av_tegn_sett_fra_depotet__i_tidsskriftet_Aksess.html</guid>
634 <pubDate>Wed, 15 Nov 2023 09:20:00 +0100</pubDate>
635 <description>&lt;p&gt;For noen uker siden skrev en kamerat og meg
636 &lt;a href=&quot;https://www.aksess-tidsskrift.no/fordypning/175530&quot;&gt;en
637 artikkel om tegnsett&lt;/a&gt; i
638 &lt;a href=&quot;https://www.aksess-tidsskrift.no/&quot;&gt;arkivtidsskriftet
639 Aksess&lt;/a&gt; både på web og i papirutgave nr. 3 2023. Her er det som
640 nettopp ble publisert.&lt;/p&gt;
641
642 &lt;blockquote&gt;
643
644 &lt;p&gt;&lt;strong&gt;Når «på» blir «pÃ¥»: Et reservoar av tegn sett fra
645 depotet&lt;/strong&gt;&lt;/p&gt;
646
647 &lt;p&gt;av Thomas Sødring og Petter Reinholdtsen&lt;/p&gt;
648
649 &lt;p&gt;De færreste av oss tenker over hva som skjer dypere i datamaskinen
650 mens vi sitter der og skriver noe på tastaturet. Når du trykker på
651 tasten «Å», så vises bokstaven Å. Men noen ganger blir det
652 feil. Hvorfor det – og hva er viktig å være klar over i
653 arkivsammenheng?&lt;/p&gt;
654
655 &lt;p&gt;Dersom bokstaver tolkes forskjellig mellom systemer, blir det fort
656 rot, dette kalles mojibake blant kjennere, etter det japanske
657 uttrykket for tegnomforming. Det er en lang historie her som tidvis
658 har vært preget av rot. Noen husker kanskje tilbake til en tid der
659 bokstavene æ, ø og å ofte var ødelagt i e-poster – et klassisk
660 eksempel på tegnsettproblemstilling.&lt;/p&gt;
661
662 &lt;p id=&quot;tegnsett_access_nå_og_før&quot;&gt;&lt;strong&gt;«Nå» og «før»&lt;/strong&gt;&lt;/p&gt;
663
664 &lt;p&gt;Tid er et skjult problem for depot fordi vi danner dokumentasjon i
665 en kontekst som er preget av å være «nå». Vår forståelse av verden og
666 bruken av teknologi er utgangspunktet for denne konteksten. Tenk selv
667 hvordan verden har utviklet seg de siste 20 årene, hva samfunnet er
668 opptatt av, og hvordan vi bruker teknologi i hverdagen. Tid er et
669 skjult problem fordi når vi trekker dokumentasjon ut av systemer og
670 deponerer for langtidsbevaring, er konteksten til materialet «nå», men
671 verden går videre. Ettersom teknologien og måten vi bruker den på,
672 utvikler seg, blir «nå» til «før», og dokumentasjonen befinner seg
673 snart i en «før»-kontekst.&lt;/p&gt;
674
675 &lt;p&gt;Dette med «før» og «nå» i forhold til dokumentasjonens kontekst er
676 noe vi er veldig lite bevisste på, men det er en problemstilling
677 depotarkivene eier og forvalter. En av disse utfordringene er hvorfor
678 «Ø» ikke nødvendigvis er det samme som «Ø», og hvorfor det i det hele
679 tatt gir mening å si noe sånt. Vi snakker her om noe som heter
680 tegnsett, som er en avtalt måte å representere bokstaver, tall og
681 andre symboler på slik at vi på en feilfri måte kan utveksle tekst
682 mellom datasystemer.&lt;/p&gt;
683
684 &lt;p&gt;Tegnsettproblemstillingen er satt sammen av fire fasetter;
685 repertoar, representasjon, koding og uttegning.&lt;/p&gt;
686
687 &lt;p id=&quot;tegnsett_access_repertoarer&quot;&gt;&lt;strong&gt;Repertoarer&lt;/strong&gt;&lt;/p&gt;
688
689 &lt;p&gt;Repertoar er en samling med tegn og symboler som kan
690 representeres. Tenk norsk alfabet eller japanske piktogrammer, men
691 også matematiske og elektroniske symboler. Bokstaven «stor a» kan være
692 en oppføring i et slikt repertoar. For å kunne brukes i en datamaskin
693 trenger hver oppføring i et slikt repertoar en representasjon, hvilket
694 i datamaskinsammenheng betyr at det tilordnes et tall. Tallet kan
695 lagres på ulike vis i en eller flere kodingsformater. For eksempel kan
696 en skrive tallet ti som både 10, X og A, i henholdsvis
697 titallssystemet, romertallssystemet og sekstentallssystemet.&lt;/p&gt;
698
699 &lt;p&gt;Hvis en skal kunne lese inn filer og vite hvilket tall og hvilken
700 representasjon og instans i et repertoar det er snakk om, så må en
701 vite hvordan tallet er kodet. Sist, men ikke minst, for å kunne bruke
702 symbolet til noe må det kunne være kjent hvordan det skal se ut eller
703 tegnes på ark. Det finnes utallige skrifttyper med norske bokstaver,
704 alle litt forskjellige, og skal en kunne tegne en stor A på skjermen,
705 så må datamaskinen vite hva den skal tegne. Skrifttyper inneholder
706 informasjon om hvordan ulike tall skal tegnes. De inneholder ikke
707 alltid alle symbolene som er brukt i en tekst, hvilket gjør at ikke
708 alle forståtte tegn vil kunne vises på skjerm eller ark.&lt;/p&gt;
709
710 &lt;p&gt;Hver av disse fasettene må være avklart for å kunne ta vare på og vise
711 frem tekst med en datamaskin. Kombinasjon av repertoar, representasjon
712 og koding er det en kaller et tegnsett. Kombinasjonen av
713 representasjon og uttegning kalles en skrifttype. De fleste
714 skrifttyper har også informasjon om repertoar, men det finnes
715 skrifttyper som kun kobler mellom tallkode og uttegning, uten å
716 fortelle noe om hvordan tallkodene egentlig skal tolkes.&lt;/p&gt;
717
718 &lt;p id=&quot;tegnsett_access_fra_ascii_til_iso_8859&quot;&gt;&lt;strong&gt;Fra ASCII til ISO-8859&lt;/strong&gt;&lt;/p&gt;
719
720 &lt;p&gt;Vi begynner historien med ASCII (American Standard Code for
721 Information Interchange) som har en historie som spores tilbake til
722 1963. Utgangspunktet til ASCII var at det kunne kode opp til 128
723 forskjellige symboler i vanlig bruk i USA. De visuelle symbolene i
724 ASCII er de små og store bokstavene (a til z og A til Z), tall (0 til
725 9) og tegnsettingssymboler (for eksempel semikolon, komma og
726 punktum). ASCII har også noen usynlige symboler som ble brukt for
727 bl.a. kommunikasjon. Før ASCII var det for eksempel teleks-tegnsett
728 med plass til bare 32 tegn og EBCDIC med plass til 256 tegn, alle med
729 en helt annen rekkefølge på symbolene enn ASCII, men de har vært lite
730 brukt de siste femti årene. Et eksempel på noen utvalgte symboler i
731 repertoaret til ASCII vises i tabell 1.&lt;/p&gt;
732
733 &lt;table align=&quot;center&quot; width=&quot;50%&quot;&gt;
734
735 &lt;caption&gt;Tabell 1. Eksempel på utvalgte symboler hentet fra
736 ASCII-tegnsettet. Kolonnen «Binær» viser symbolets verdi i
737 totallssystemet (1 og 0 tall), mens kolonnen «Desimal» viser symbolets
738 verdi i titallssystemet.&lt;/caption&gt;
739
740 &lt;tbody&gt;
741 &lt;tr&gt;
742 &lt;th&gt;Grafisk&lt;/th&gt;
743 &lt;th&gt;Binær&lt;/th&gt;
744 &lt;th&gt;Desimal&lt;/th&gt;
745 &lt;/tr&gt;
746 &lt;tr&gt;
747 &lt;td&gt;A&lt;/td&gt;
748 &lt;td&gt;1000001&lt;/td&gt;
749 &lt;td align=&quot;right&quot;&gt;65&lt;/td&gt;
750 &lt;/tr&gt;
751 &lt;tr&gt;
752 &lt;td&gt;M&lt;/td&gt;
753 &lt;td&gt;1001101&lt;/td&gt;
754 &lt;td align=&quot;right&quot;&gt;77&lt;/td&gt;
755 &lt;/tr&gt;
756 &lt;tr&gt;
757 &lt;td&gt;Z&lt;/td&gt;
758 &lt;td&gt;1011010&lt;/td&gt;
759 &lt;td align=&quot;right&quot;&gt;90&lt;/td&gt;
760 &lt;/tr&gt;
761 &lt;tr&gt;
762 &lt;td&gt;a&lt;/td&gt;
763 &lt;td&gt;1100001&lt;/td&gt;
764 &lt;td align=&quot;right&quot;&gt;97&lt;/td&gt;
765 &lt;/tr&gt;
766 &lt;tr&gt;
767 &lt;td&gt;m&lt;/td&gt;
768 &lt;td&gt;1101101&lt;/td&gt;
769 &lt;td align=&quot;right&quot;&gt;109&lt;/td&gt;
770 &lt;/tr&gt;
771 &lt;tr&gt;
772 &lt;td&gt;z&lt;/td&gt;
773 &lt;td&gt;1111010&lt;/td&gt;
774 &lt;td align=&quot;right&quot;&gt;122&lt;/td&gt;
775 &lt;/tr&gt;
776 &lt;tr&gt;
777 &lt;td&gt;0&lt;/td&gt;
778 &lt;td&gt;0110000&lt;/td&gt;
779 &lt;td align=&quot;right&quot;&gt;48&lt;/td&gt;
780 &lt;/tr&gt;
781 &lt;tr&gt;
782 &lt;td&gt;9&lt;/td&gt;
783 &lt;td&gt;0111001&lt;/td&gt;
784 &lt;td align=&quot;right&quot;&gt;58&lt;/td&gt;
785 &lt;/tr&gt;
786 &lt;tr&gt;
787 &lt;td&gt;;&lt;/td&gt;
788 &lt;td&gt;0111011&lt;/td&gt;
789 &lt;td align=&quot;right&quot;&gt;59&lt;/td&gt;
790 &lt;/tr&gt;
791 &lt;/tbody&gt;
792 &lt;/table&gt;
793
794 &lt;p&gt;Det opprinnelige ASCII-tegnsettet ble også omtalt som ASCII-7 og
795 brukte 7 bits (0 og 1) for å representere symboler. Datamaskiner er
796 ofte konfigurert til å jobbe med enheter der bits er gruppert som 4
797 eller 8 bits . Det lå en mulighet i å ta i bruk bit åtte. En slik
798 endring ville gjøre det mulig for datamaskiner å øke antall symboler
799 de kunne representere, noe som ga en økning fra 128 forskjellige
800 symboler til 256 forskjellige symboler. Det ble åpnet for å innlemme
801 de nordiske bokstavene sammen med ASCII, og dette ble etter hvert
802 standardisert som ISO-8859-1. Tabell 2 viser deler av ISO-8859-1 som
803 støtter de norske bokstavene.&lt;/p&gt;
804
805 &lt;p&gt;Det sier seg selv at muligheten til å representere inntil 256 symboler
806 ikke holder når vi snakker om en global verden, og det ble gjort et
807 standardiseringsløp som tok utgangspunkt i ASCII-7 med en utvidelse
808 til å bruke den åttende biten for ulike språkgrupper. Denne standarden
809 heter ISO-8859 og er inndelt i opptil 16 varianter, altså fra
810 ISO-8859-1 til ISO-8859-16.&lt;/p&gt;
811
812 &lt;table align=&quot;center&quot; width=&quot;50%&quot;&gt;
813
814 &lt;caption&gt;Tabell 2. Koding av de norske symbolene slik de er definert i
815 ISO-8859-1 tegnsettet.&lt;/caption&gt;
816
817 &lt;tbody&gt;
818 &lt;tr&gt;
819 &lt;th&gt;Grafisk&lt;/th&gt;
820 &lt;th&gt;Binær&lt;/th&gt;
821 &lt;th&gt;Desimal&lt;/th&gt;
822 &lt;/tr&gt;
823 &lt;tr&gt;
824 &lt;td&gt;Æ&lt;/td&gt;
825 &lt;td&gt;11000110&lt;/td&gt;
826 &lt;td align=&quot;right&quot;&gt;198&lt;/td&gt;
827 &lt;/tr&gt;
828 &lt;tr&gt;
829 &lt;td&gt;Ø&lt;/td&gt;
830 &lt;td&gt;11011000&lt;/td&gt;
831 &lt;td align=&quot;right&quot;&gt;216&lt;/td&gt;
832 &lt;/tr&gt;
833 &lt;tr&gt;
834 &lt;td&gt;Å&lt;/td&gt;
835 &lt;td&gt;11000101&lt;/td&gt;
836 &lt;td align=&quot;right&quot;&gt;197&lt;/td&gt;
837 &lt;/tr&gt;
838 &lt;tr&gt;
839 &lt;td&gt;æ&lt;/td&gt;
840 &lt;td&gt;11100110&lt;/td&gt;
841 &lt;td align=&quot;right&quot;&gt;230&lt;/td&gt;
842 &lt;/tr&gt;
843 &lt;tr&gt;
844 &lt;td&gt;ø&lt;/td&gt;
845 &lt;td&gt;11111000&lt;/td&gt;
846 &lt;td align=&quot;right&quot;&gt;248&lt;/td&gt;
847 &lt;/tr&gt;
848 &lt;tr&gt;
849 &lt;td&gt;å&lt;/td&gt;
850 &lt;td&gt;11100101&lt;/td&gt;
851 &lt;td align=&quot;right&quot;&gt;229&lt;/td&gt;
852 &lt;/tr&gt;
853 &lt;/tbody&gt;
854 &lt;/table&gt;
855
856 &lt;p&gt;Norske tegn er definert i ISO-8859-1, som også omtales som Latin 1, de
857 fleste samiske tegn er definert i ISO-8859-4 (Latin 4) mens tilgang
858 til €-symbolet kom med ISO-8859-15 (Latin 9). ISO-8859-15 er en
859 revisjon av ISO-8859-1 som fjerner noen lite brukte symboler og
860 erstatter bokstaver som er mer brukt, og introduserer €-symbolet. Det
861 er viktig å merke at alle ISO-8859-variantene har overlapp med
862 ASCII-7, noe som ga samvirke med de engelskspråklige landene som ikke
863 trengte å gjøre noe. Det innebærer også at de første 128 verdiene i
864 ISO-8859-variantene representerer de samme symbolene. Det er først når
865 du kommer til tolkningen av de resterende 128 verdiene med nummer 128
866 til 255, at det oppsto tolkningsutfordringer mellom
867 ISO-8859-variantene.&lt;/p&gt;
868
869 &lt;p&gt;ISO-8859-verdenen fungerte godt så lenge tegnsettet som ble brukt når
870 innhold ble skapt, også ble brukt når innhold ble gjengitt og du ikke
871 trengte å kombinere innhold fra forskjellige tegnsett i samme
872 dokument. Utfordringen med bruken av ISO-8859-variantene ble raskt
873 tydelig i en mer globalisert verden med utveksling av tekst på tvers
874 av landegrenser der tekstlig innhold i dokumenter, e-poster og
875 websider kunne bli skrevet med ett tegnsett og gjengitt med et annet
876 tegnsett.&lt;/p&gt;
877
878 &lt;table align=&quot;center&quot; width=&quot;60%&quot;&gt;
879
880 &lt;caption&gt;Tabell 3. Viser tolkning av verdiene som er tilegnet de
881 norske symbolene i ISO-8859-1 i de andre ISO 8859-variatene. Merk
882 ISO-8859-12 ikke finnes da arbeidet ble avsluttet.&lt;sup&gt;[&lt;a id=&quot;tegnsett_access_footnoteref_1&quot; href=&quot;#tegnsett_access_footnotedef_1&quot; title=&quot;View footnote.&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;&lt;/caption&gt;
883
884 &lt;tbody&gt;
885 &lt;tr&gt;
886 &lt;th&gt;Binærverdi&lt;/th&gt;
887 &lt;th&gt;1&lt;/th&gt;
888 &lt;th&gt;2&lt;/th&gt;
889 &lt;th&gt;3&lt;/th&gt;
890 &lt;th&gt;4&lt;/th&gt;
891 &lt;th&gt;5&lt;/th&gt;
892 &lt;th&gt;6&lt;/th&gt;
893 &lt;th&gt;7&lt;/th&gt;
894 &lt;th&gt;8&lt;/th&gt;
895 &lt;th&gt;9&lt;/th&gt;
896 &lt;th&gt;10&lt;/th&gt;
897 &lt;th&gt;11&lt;/th&gt;
898 &lt;th&gt;13&lt;/th&gt;
899 &lt;th&gt;14&lt;/th&gt;
900 &lt;th&gt;15&lt;/th&gt;
901 &lt;th&gt;16&lt;/th&gt;
902 &lt;/tr&gt;
903 &lt;tr&gt;
904 &lt;td&gt;11000110&lt;/td&gt;
905 &lt;td&gt;Æ&lt;/td&gt;
906 &lt;td&gt;Ć&lt;/td&gt;
907 &lt;td&gt;Ĉ&lt;/td&gt;
908 &lt;td&gt;Æ&lt;/td&gt;
909 &lt;td&gt;Ц&lt;/td&gt;
910 &lt;td&gt;ئ&lt;/td&gt;
911 &lt;td&gt;Ζ&lt;/td&gt;
912 &lt;td&gt;&lt;/td&gt;
913 &lt;td&gt;Æ&lt;/td&gt;
914 &lt;td&gt;Æ&lt;/td&gt;
915 &lt;td&gt;&lt;/td&gt;
916 &lt;td&gt;Ę&lt;/td&gt;
917 &lt;td&gt;Æ&lt;/td&gt;
918 &lt;td&gt;Æ&lt;/td&gt;
919 &lt;td&gt;Æ&lt;/td&gt;
920 &lt;/tr&gt;
921 &lt;tr&gt;
922 &lt;td&gt;11011000&lt;/td&gt;
923 &lt;td&gt;Ø&lt;/td&gt;
924 &lt;td&gt;Ř&lt;/td&gt;
925 &lt;td&gt;Ĝ&lt;/td&gt;
926 &lt;td&gt;Ø&lt;/td&gt;
927 &lt;td&gt;и&lt;/td&gt;
928 &lt;td&gt;ظ&lt;/td&gt;
929 &lt;td&gt;Ψ&lt;/td&gt;
930 &lt;td&gt;&lt;/td&gt;
931 &lt;td&gt;Ø&lt;/td&gt;
932 &lt;td&gt;Ø&lt;/td&gt;
933 &lt;td&gt;&lt;/td&gt;
934 &lt;td&gt;Ų&lt;/td&gt;
935 &lt;td&gt;Ø&lt;/td&gt;
936 &lt;td&gt;Ø&lt;/td&gt;
937 &lt;td&gt;Ű&lt;/td&gt;
938 &lt;/tr&gt;
939 &lt;tr&gt;
940 &lt;td&gt;11000101&lt;/td&gt;
941 &lt;td&gt;Å&lt;/td&gt;
942 &lt;td&gt;Ĺ&lt;/td&gt;
943 &lt;td&gt;Ċ&lt;/td&gt;
944 &lt;td&gt;Å&lt;/td&gt;
945 &lt;td&gt;Х&lt;/td&gt;
946 &lt;td&gt;إ&lt;/td&gt;
947 &lt;td&gt;Ε&lt;/td&gt;
948 &lt;td&gt;&lt;/td&gt;
949 &lt;td&gt;Å&lt;/td&gt;
950 &lt;td&gt;Å&lt;/td&gt;
951 &lt;td&gt;&lt;/td&gt;
952 &lt;td&gt;Å&lt;/td&gt;
953 &lt;td&gt;Å&lt;/td&gt;
954 &lt;td&gt;Å&lt;/td&gt;
955 &lt;td&gt;Ć&lt;/td&gt;
956 &lt;/tr&gt;
957 &lt;tr&gt;
958 &lt;td&gt;11100110&lt;/td&gt;
959 &lt;td&gt;æ&lt;/td&gt;
960 &lt;td&gt;ć&lt;/td&gt;
961 &lt;td&gt;ĉ&lt;/td&gt;
962 &lt;td&gt;æ&lt;/td&gt;
963 &lt;td&gt;ц&lt;/td&gt;
964 &lt;td&gt;ن&lt;/td&gt;
965 &lt;td&gt;ζ&lt;/td&gt;
966 &lt;td&gt;ז&lt;/td&gt;
967 &lt;td&gt;æ&lt;/td&gt;
968 &lt;td&gt;æ&lt;/td&gt;
969 &lt;td&gt;&lt;/td&gt;
970 &lt;td&gt;ę&lt;/td&gt;
971 &lt;td&gt;æ&lt;/td&gt;
972 &lt;td&gt;æ&lt;/td&gt;
973 &lt;td&gt;v&lt;/td&gt;
974 &lt;/tr&gt;
975 &lt;tr&gt;
976 &lt;td&gt;11111000&lt;/td&gt;
977 &lt;td&gt;ø&lt;/td&gt;
978 &lt;td&gt;ř&lt;/td&gt;
979 &lt;td&gt;ĝ&lt;/td&gt;
980 &lt;td&gt;ø&lt;/td&gt;
981 &lt;td&gt;ј&lt;/td&gt;
982 &lt;td&gt;&lt;/td&gt;
983 &lt;td&gt;ψ&lt;/td&gt;
984 &lt;td&gt;ר&lt;/td&gt;
985 &lt;td&gt;ø&lt;/td&gt;
986 &lt;td&gt;ø&lt;/td&gt;
987 &lt;td&gt;&lt;/td&gt;
988 &lt;td&gt;ų&lt;/td&gt;
989 &lt;td&gt;ø&lt;/td&gt;
990 &lt;td&gt;ø&lt;/td&gt;
991 &lt;td&gt;ű&lt;/td&gt;
992 &lt;/tr&gt;
993 &lt;tr&gt;
994 &lt;td&gt;11100101&lt;/td&gt;
995 &lt;td&gt;å&lt;/td&gt;
996 &lt;td&gt;ĺ&lt;/td&gt;
997 &lt;td&gt;ċ&lt;/td&gt;
998 &lt;td&gt;å&lt;/td&gt;
999 &lt;td&gt;х&lt;/td&gt;
1000 &lt;td&gt;م&lt;/td&gt;
1001 &lt;td&gt;ε&lt;/td&gt;
1002 &lt;td&gt;ו&lt;/td&gt;
1003 &lt;td&gt;å&lt;/td&gt;
1004 &lt;td&gt;å&lt;/td&gt;
1005 &lt;td&gt;&lt;/td&gt;
1006 &lt;td&gt;å&lt;/td&gt;
1007 &lt;td&gt;å&lt;/td&gt;
1008 &lt;td&gt;å&lt;/td&gt;
1009 &lt;td&gt;ć&lt;/td&gt;
1010 &lt;/tr&gt;
1011 &lt;/tbody&gt;
1012 &lt;/table&gt;
1013
1014 &lt;p&gt;Denne problemstillingen er illustrert i tabell 3, der vi ser verdiene
1015 tilegnet de norske symbolene i ISO-8859-1 i kolonne «1». I de øvrige
1016 kolonnene ser vi hvilket symbol verdien får i de andre
1017 ISO-8859-variantene. Tar vi utgangspunkt i tabell 3, kan vi se at
1018 ordet lærlingspørsmål gjengitt med ISO-8859-2 (kolonne 2) blir
1019 lćrlingspřrsmĺl, mens det blir lζrlingspψrsmεl med ISO- 8859-7
1020 (kolonne 7). Med ISO-8859-2 blir «æ» til «ć», «ø» til «ř» og «å» til
1021 «ĺ». I ISO-8859-7 blir «æ» til «ζ», «ø» til «ψ», mens «å» blir «ε».&lt;/p&gt;
1022
1023 &lt;p&gt;Det er egentlig ingen utfordring med dette så lenge du vet hvilket
1024 tegnsett innholdet ditt er representert med, og det ikke har skjedd
1025 omforminger som du ikke er klar over. Det er det siste som er
1026 problematisk, spesielt de datasystemene som har vært i bruk de siste
1027 20 årene, som ikke har noe innebygd funksjonalitet for å forvalte
1028 tegnsettproblematikken. Et godt eksempel på dette er
1029 Microsoft-tegnsettet Windows-1252, som ble forvekslet som 100 %
1030 kompatibel med ISO-8859-1, men hadde byttet ut plassene fra 127 til
1031 159. Historisk vil det finnes en del variasjon i hvilket tegnsett som
1032 har vært i bruk, og hvor vellykket konvertering mellom tegnsett har
1033 vært.&lt;/p&gt;
1034
1035 &lt;p id=&quot;tegnsett_access_unicode_som_løsning&quot;&gt;&lt;strong&gt;Unicode som løsning&lt;/strong&gt;&lt;/p&gt;
1036
1037 &lt;p&gt;Tegnsettforvirring ble etter hvert et irritasjonsmoment og
1038 samvirkeproblem. Ofte fikk man en e-post der æøå var erstattet av rare
1039 symboler fordi e-posten hadde vært innom et eller annet datasystem som
1040 ikke brukte samme tegnsett.&lt;/p&gt;
1041
1042 &lt;p&gt;For å løse dette samvirkeproblemet for tegnsett ble det startet et
1043 arbeid og en ny standard så dagens lys etter hvert. Denne standarden
1044 fikk navnet Unicode (ISO/ IEC 10646) og skulle resultere i et tegnsett
1045 som alle skulle være enige om. Unicode er et repertoar og en
1046 representasjon, dvs. navngivning og tilordning av tallverdi til alle
1047 symboler i bruk i verden i dag. Oppføringer i Unicode skrives gjerne
1048 U+XXXX der XXXX er tallkoden i sekstentallssystemet som oppføringen
1049 har i Unicode-katalogen. Her finner vi tegn brukt av både levende og
1050 døde språk, konstruerte språk, tekniske symboler, morsomme tegninger
1051 (såkalte emojier) og tegn ingen vet hva betyr eller skal brukes
1052 til. Et morsomt eksempel er i nettartikkelen: U+237C ⍼ RIGHT ANGLE
1053 WITH DOWNWARDS ZIGZAG ARROW, av Jonathan Chan.&lt;sup&gt;[&lt;a id=&quot;tegnsett_access_footnoteref_2&quot; href=&quot;#tegnsett_access_footnotedef_2&quot; title=&quot;View footnote.&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt;&lt;/p&gt;
1054
1055 &lt;p&gt;Sammen med Unicode kom det tre måter å kode disse tallene på; UTF-8,
1056 UTF-16 og UTF-32. Av datatekniske årsaker er UTF-8 mye brukt, spesielt
1057 når det gjelder utveksling av tekst over Internett, mens UTF-16 er
1058 brukt en del til tekstfiler lagret på Windows. En utfordring med
1059 Unicode og UTF-variantene er at disse gir flere måter å kode samme
1060 symbol på med en kombinasjonsmekanisme. Dette kan gi utfordringer ved
1061 søk, hvis en skal søke etter et ord som har ett eller flere symboler
1062 som kan skrives på ulikt vis, så er det ikke sikkert at søkesystemet
1063 vil finne alle forekomster. For eksempel kan bokstaven U+00F8 «Latin
1064 Small Letter O with Stroke» kodes som den tradisjonelle norske tegnet
1065 ø, men også som o kombinert med skråstrek U+0338. Begge deler er
1066 gyldig bruk av Unicode, selv om det er tradisjon for å foretrekke å
1067 «normalisere» kombinasjoner som enkelttegn der det er mulig, nettopp
1068 for å forenkle søk.&lt;/p&gt;
1069
1070 &lt;p id=&quot;tegnsett_access_bare_unicode_fremover&quot;&gt;&lt;strong&gt;Bare Unicode fremover&lt;/strong&gt;&lt;/p&gt;
1071
1072 &lt;p&gt;Forvaltningens bruk av tegnsett er regulert i Forskrift om
1073 IT-standarder i offentlig forvaltning&lt;sup&gt;[&lt;a id=&quot;tegnsett_access_footnoteref_3&quot; href=&quot;#tegnsett_access_footnotedef_3&quot; title=&quot;View footnote.&quot;&gt;3&lt;/a&gt;]&lt;/sup&gt;. Her står det: «Ved all
1074 utveksling av informasjon mellom forvaltningsorganer og fra
1075 forvaltningsorgan til innbyggere og næringsliv skal tegnsettstandarden
1076 ISO/IEC 10646 representert ved UTF8 benyttes.» Det er forskjellige
1077 bruksområder til UTF-8, UTF-16 og UTF-32, men UTF-8 er kodingen vi
1078 kjenner mest til. Det er flere grunner at UTF-8 «vant» konkurransen
1079 til å bli den utvalgte. Den kanskje viktigste er at UTF-8 er fullt
1080 samvirkende med ASCII-7, slik at den engelskspråklige delen av verden
1081 kunne rulle ut UTF-8 uten å merke noe forskjell. En tekstfil med kun
1082 ASCII-tekst vil være identisk på disken hvis den lagres som UTF-8 og
1083 ASCII. UTF-16 og UTF-32 byr på noen optimaliseringer som gjør dem
1084 relevant for spesifikke problemområder, men for det meste vil vi aldri
1085 oppleve disse standardene på nært hold i hverdagen. Det er uansett kun
1086 bruken av UTF-8 som er lovregulert i Norge.&lt;/p&gt;
1087
1088 &lt;p&gt;Det er ikke slik at hele verden bruker ISO/IEC 10646 og UTF-8. Kina
1089 har egne standarder for tegnsett, mye brukt er GB 18030, som er
1090 Unicode med en annen koding enn UTF-8, mens Taiwan og andre asiatiske
1091 land gjerne bruker Big5 eller andre tegnsett.&lt;/p&gt;
1092
1093 &lt;p&gt;UTF-8 er dominerende i Norge, men det er tidsperioder der forskjellige
1094 datasystemer utvekslet data i henhold til ISO-8859-1, ISO-8859-15,
1095 Windows-1252, Codepage 865 og ISO-646-60 / Codepage 1016 mens
1096 overgangen til UTF-8 pågikk. Det er ikke slik at et datasystem enkelt
1097 kan tvinges til å bruke et tegnsett, da det er flere lag i et
1098 datasystem som må settes opp til å bruke riktig tegnsett, og
1099 tegnsettproblemet fort oppstår når det er et eller annet i
1100 datasystemet som bruker feil tegnsett.&lt;/p&gt;
1101
1102 &lt;p&gt;Et klassisk eksempel på problemet er en utveksling av tekst mellom to
1103 systemer der teksten i utgangspunktet er kodet i UTF-8, men går
1104 gjennom noe som er ISO-8859-1 underveis. Dette kan vises med at ordet
1105 «på» i et slik scenario ender opp som «pÃ¥». Det er mulig å spore
1106 dette tilbake til verdiene symbolene er tilordnet i tegnsettene. «på»
1107 blir til «pÃ¥» fordi «å» i UTF-8 er representert med U+C3AF, og dersom
1108 vi ser på hva disse verdiene representerer, ser vi at
1109 sekstentallssystemverdien C3 er 1100 0011 i totallssystemet og
1110 symbolet med dette tallet i ISO-8859-1 er Ã.&lt;/p&gt;
1111
1112 &lt;p&gt;Vi ser det samme med sekstentallssystemverdien A5, som er 1010 0101 i
1113 totallssystemet, og tilsvarende symbol i ISO-8859-1 er ¥. Slik
1114 mojibake kan lett skje hvis «på» i utgangspunktet var representert med
1115 UTF-8, men ble behandlet med et system som bruker ISO-8859-1. Det er
1116 ingen automatikk i å fange opp slike ødeleggelser mens tekstlig
1117 innhold utveksles mellom datasystemer.&lt;/p&gt;
1118
1119 &lt;p&gt;En utfordring for depotarkivene er at bruken av tegnsett ikke alltid
1120 har vært regulert, og at det kan finnes flere dokumentasjonssamlinger
1121 som er opprettet med varierende tegnsett før gjeldende forskrift
1122 inntraff – uten at det er mulig å avlede fra filene hvilket tegnsett
1123 som ble brukt. Et eksempel på dette er €-symbolet, som kom først etter
1124 at ISO-8859-1 var tatt i bruk. Det kan bli en utfordring for et
1125 depotarkiv, men så lenge det er kjent hvilket tegnsett var i bruk, så
1126 bør det gå bra. Riksarkivarens
1127 forskrift&lt;sup&gt;[&lt;a id=&quot;tegnsett_access_footnoteref_4&quot; href=&quot;#tegnsett_access_footnotedef_4&quot; title=&quot;View footnote.&quot;&gt;4&lt;/a&gt;]&lt;/sup&gt;
1128 formaliserer dette ved å kreve følgende:&lt;/p&gt;
1129
1130 &lt;blockquote&gt;
1131 &lt;p&gt;§ 5-11. Tegnsett i arkivuttrekk&lt;/p&gt;
1132
1133 &lt;ol&gt;
1134 &lt;li&gt;Arkivuttrekk og medfølgende struktur- og innholdsbeskrivelser skal
1135 overføres som ren tekst i ukryptert form, og benytte godkjent
1136 tegnsett.&lt;/li&gt;
1137
1138 &lt;li&gt;Godkjente tegnsett er:
1139 &lt;ol&gt;
1140 &lt;li&gt;Unicode UTF-8&lt;br&gt;
1141 (ISO/IEC 10646-1:2000 Annex D)&lt;/li&gt;
1142 &lt;li&gt;ISO 8859-1:1998, Latin 1&lt;/li&gt;
1143 &lt;li&gt;ISO 8859-4:1998, Latin 4 for samiske tegn.&lt;/li&gt;
1144 &lt;/ol&gt;&lt;/li&gt;
1145
1146 &lt;li&gt;Andre tegnsett aksepteres bare etter avtale med Arkivverket.&lt;/li&gt;
1147 &lt;/ol&gt;
1148 &lt;/blockquote&gt;
1149
1150 &lt;p id=&quot;tegnsett_access_ditt_ansvar&quot;&gt;&lt;strong&gt;Ditt ansvar&lt;/strong&gt;&lt;/p&gt;
1151
1152 &lt;p&gt;På mange måter burde ikke tegnsett være et problem i 2023, men sånn er
1153 det nok ikke. Land som har oppgradert til UTF-8 som primærtegnsett for
1154 utveksling av tekstlig innhold, begrenser problematikken betraktelig,
1155 men globalt sett så er tegnsettutfordringen ikke løst fordi ikke alle
1156 er enige om å bruke samme tegnsett. Det kan være geopolitiske eller
1157 kulturelle hensyn som ligger til grunn for dette.&lt;/p&gt;
1158
1159 &lt;p&gt;Det er uansett verdt å merke at selv om bruken av UTF-8 skulle bli
1160 100% utbredt, så er det et historisk perspektiv (ASCII-7,
1161 ISO-8859-variantene, UTF-8) her som gjør tegnsett til et problemområde
1162 arkivarene må forstå og håndtere. Som danningsarkivar har du et
1163 ansvar for å vite hvilket tegnsett systemene og databasene dere
1164 forvalter, er i samsvar med. Det er noe IT-avdelingen din eller
1165 programvareleverandørene enkelt skal kunne svare på, og svaret skal
1166 være UTF-8 for alle nye systemer.&lt;/p&gt;
1167
1168 &lt;hr&gt;
1169
1170 &lt;p id=&quot;tegnsett_access_footnotedef_1&quot;&gt;&lt;a href=&quot;#tegnsett_access_footnoteref_1&quot;&gt;1&lt;/a&gt;. Tegnsettkilde &lt;a href=&quot;https://en.wikipedia.org/wiki/ISO/IEC_8859&quot;&gt;https://en.wikipedia.org/wiki/ISO/IEC_8859&lt;/a&gt;&lt;/p&gt;
1171
1172 &lt;p id=&quot;tegnsett_access_footnotedef_2&quot;&gt;&lt;a href=&quot;#tegnsett_access_footnoteref_2&quot;&gt;2&lt;/a&gt;. &lt;a href=&quot;https://ionathan.ch/2022/04/09/angzarr.html&quot;&gt;https://ionathan.ch/2022/04/09/angzarr.html&lt;/a&gt;&lt;/p&gt;
1173
1174 &lt;p id=&quot;tegnsett_access_footnotedef_3&quot;&gt;&lt;a href=&quot;#tegnsett_access_footnoteref_3&quot;&gt;3&lt;/a&gt;. &lt;a href=&quot;https://lovdata.no/dokument/SF/forskrift/2013-04-05-959/%C2%A78#%C2%A78&quot;&gt;https://lovdata.no/dokument/SF/forskrift/2013-04-05-959/%C2%A78#%C2%A78&lt;/a&gt;&lt;/p&gt;
1175
1176 &lt;p id=&quot;tegnsett_access_footnotedef_4&quot;&gt;&lt;a href=&quot;#tegnsett_access_footnoteref_4&quot;&gt;4&lt;/a&gt;. &lt;a href=&quot;https://lovdata.no/forskrift/2017-12-19-22865-11&quot;&gt;https://lovdata.no/forskrift/2017-12-19-22865-11&lt;/a&gt;&lt;/p&gt;
1177
1178 &lt;/blockquote&gt;
1179
1180 &lt;p&gt;For øvrig burde varsleren Edward Snowden få politisk asyl i Norge.&lt;/p&gt;
1181
1182 &lt;p&gt;Som vanlig, hvis du bruker Bitcoin og ønsker å vise din støtte til
1183 det jeg driver med, setter jeg pris på om du sender Bitcoin-donasjoner
1184 til min adresse
1185 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;. Merk,
1186 betaling med bitcoin er ikke anonymt. :)&lt;/p&gt;
1187 </description>
1188 </item>
1189
1190 <item>
1191 <title>New and improved sqlcipher in Debian for accessing Signal database</title>
1192 <link>https://people.skolelinux.org/pere/blog/New_and_improved_sqlcipher_in_Debian_for_accessing_Signal_database.html</link>
1193 <guid isPermaLink="true">https://people.skolelinux.org/pere/blog/New_and_improved_sqlcipher_in_Debian_for_accessing_Signal_database.html</guid>
1194 <pubDate>Sun, 12 Nov 2023 12:00:00 +0100</pubDate>
1195 <description>&lt;p&gt;For a while now I wanted to have direct access to the
1196 &lt;a href=&quot;https://signal.org/&quot;&gt;Signal&lt;/a&gt; database of messages and
1197 channels of my Desktop edition of Signal. I prefer the enforced end
1198 to end encryption of Signal these days for my communication with
1199 friends and family, to increase the level of safety and privacy as
1200 well as raising the cost of the mass surveillance government and
1201 non-government entities practice these days. In August I came across
1202 a nice
1203 &lt;a href=&quot;https://www.yoranbrondsema.com/post/the-guide-to-extracting-statistics-from-your-signal-conversations/&quot;&gt;recipe
1204 on how to use sqlcipher to extract statistics from the Signal
1205 database&lt;/a&gt; explaining how to do this. Unfortunately this did not
1206 work with the version of sqlcipher in Debian. The
1207 &lt;a href=&quot;http://tracker.debian.org/sqlcipher/&quot;&gt;sqlcipher&lt;/a&gt;
1208 package is a &quot;fork&quot; of the sqlite package with added support for
1209 encrypted databases. Sadly the current Debian maintainer
1210 &lt;a href=&quot;https://bugs.debian.org/961598&quot;&gt;announced more than three
1211 years ago that he did not have time to maintain sqlcipher&lt;/a&gt;, so it
1212 seemed unlikely to be upgraded by the maintainer. I was reluctant to
1213 take on the job myself, as I have very limited experience maintaining
1214 shared libraries in Debian. After waiting and hoping for a few
1215 months, I gave up the last week, and set out to update the package. In
1216 the process I orphaned it to make it more obvious for the next person
1217 looking at it that the package need proper maintenance.&lt;/p&gt;
1218
1219 &lt;p&gt;The version in Debian was around five years old, and quite a lot of
1220 changes had taken place upstream into the Debian maintenance git
1221 repository. After spending a few days importing the new upstream
1222 versions, realising that upstream did not care much for SONAME
1223 versioning as I saw library symbols being both added and removed with
1224 minor version number changes to the project, I concluded that I had to
1225 do a SONAME bump of the library package to avoid surprising the
1226 reverse dependencies. I even added a simple
1227 autopkgtest script to ensure the package work as intended. Dug deep
1228 into the hole of learning shared library maintenance, I set out a few
1229 days ago to upload the new version to Debian experimental to see what
1230 the quality assurance framework in Debian had to say about the result.
1231 The feedback told me the pacakge was not too shabby, and yesterday I
1232 uploaded the latest version to Debian unstable. It should enter
1233 testing today or tomorrow, perhaps delayed by
1234 &lt;a href=&quot;https://bugs.debian.org/1055812&quot;&gt;a small library
1235 transition&lt;/a&gt;.&lt;/p&gt;
1236
1237 &lt;p&gt;Armed with a new version of sqlcipher, I can now have a look at the
1238 SQL database in ~/.config/Signal/sql/db.sqlite. First, one need to
1239 fetch the encryption key from the Signal configuration using this
1240 simple JSON extraction command:&lt;/p&gt;
1241
1242 &lt;pre&gt;/usr/bin/jq -r &#39;.&quot;key&quot;&#39; ~/.config/Signal/config.json&lt;/pre&gt;
1243
1244 &lt;p&gt;Assuming the result from that command is &#39;secretkey&#39;, which is a
1245 hexadecimal number representing the key used to encrypt the database.
1246 Next, one can now connect to the database and inject the encryption
1247 key for access via SQL to fetch information from the database. Here
1248 is an example dumping the database structure:&lt;/p&gt;
1249
1250 &lt;pre&gt;
1251 % sqlcipher ~/.config/Signal/sql/db.sqlite
1252 sqlite&gt; PRAGMA key = &quot;x&#39;secretkey&#39;&quot;;
1253 sqlite&gt; .schema
1254 CREATE TABLE sqlite_stat1(tbl,idx,stat);
1255 CREATE TABLE conversations(
1256 id STRING PRIMARY KEY ASC,
1257 json TEXT,
1258
1259 active_at INTEGER,
1260 type STRING,
1261 members TEXT,
1262 name TEXT,
1263 profileName TEXT
1264 , profileFamilyName TEXT, profileFullName TEXT, e164 TEXT, serviceId TEXT, groupId TEXT, profileLastFetchedAt INTEGER);
1265 CREATE TABLE identityKeys(
1266 id STRING PRIMARY KEY ASC,
1267 json TEXT
1268 );
1269 CREATE TABLE items(
1270 id STRING PRIMARY KEY ASC,
1271 json TEXT
1272 );
1273 CREATE TABLE sessions(
1274 id TEXT PRIMARY KEY,
1275 conversationId TEXT,
1276 json TEXT
1277 , ourServiceId STRING, serviceId STRING);
1278 CREATE TABLE attachment_downloads(
1279 id STRING primary key,
1280 timestamp INTEGER,
1281 pending INTEGER,
1282 json TEXT
1283 );
1284 CREATE TABLE sticker_packs(
1285 id TEXT PRIMARY KEY,
1286 key TEXT NOT NULL,
1287
1288 author STRING,
1289 coverStickerId INTEGER,
1290 createdAt INTEGER,
1291 downloadAttempts INTEGER,
1292 installedAt INTEGER,
1293 lastUsed INTEGER,
1294 status STRING,
1295 stickerCount INTEGER,
1296 title STRING
1297 , attemptedStatus STRING, position INTEGER DEFAULT 0 NOT NULL, storageID STRING, storageVersion INTEGER, storageUnknownFields BLOB, storageNeedsSync
1298 INTEGER DEFAULT 0 NOT NULL);
1299 CREATE TABLE stickers(
1300 id INTEGER NOT NULL,
1301 packId TEXT NOT NULL,
1302
1303 emoji STRING,
1304 height INTEGER,
1305 isCoverOnly INTEGER,
1306 lastUsed INTEGER,
1307 path STRING,
1308 width INTEGER,
1309
1310 PRIMARY KEY (id, packId),
1311 CONSTRAINT stickers_fk
1312 FOREIGN KEY (packId)
1313 REFERENCES sticker_packs(id)
1314 ON DELETE CASCADE
1315 );
1316 CREATE TABLE sticker_references(
1317 messageId STRING,
1318 packId TEXT,
1319 CONSTRAINT sticker_references_fk
1320 FOREIGN KEY(packId)
1321 REFERENCES sticker_packs(id)
1322 ON DELETE CASCADE
1323 );
1324 CREATE TABLE emojis(
1325 shortName TEXT PRIMARY KEY,
1326 lastUsage INTEGER
1327 );
1328 CREATE TABLE messages(
1329 rowid INTEGER PRIMARY KEY ASC,
1330 id STRING UNIQUE,
1331 json TEXT,
1332 readStatus INTEGER,
1333 expires_at INTEGER,
1334 sent_at INTEGER,
1335 schemaVersion INTEGER,
1336 conversationId STRING,
1337 received_at INTEGER,
1338 source STRING,
1339 hasAttachments INTEGER,
1340 hasFileAttachments INTEGER,
1341 hasVisualMediaAttachments INTEGER,
1342 expireTimer INTEGER,
1343 expirationStartTimestamp INTEGER,
1344 type STRING,
1345 body TEXT,
1346 messageTimer INTEGER,
1347 messageTimerStart INTEGER,
1348 messageTimerExpiresAt INTEGER,
1349 isErased INTEGER,
1350 isViewOnce INTEGER,
1351 sourceServiceId TEXT, serverGuid STRING NULL, sourceDevice INTEGER, storyId STRING, isStory INTEGER
1352 GENERATED ALWAYS AS (type IS &#39;story&#39;), isChangeCreatedByUs INTEGER NOT NULL DEFAULT 0, isTimerChangeFromSync INTEGER
1353 GENERATED ALWAYS AS (
1354 json_extract(json, &#39;$.expirationTimerUpdate.fromSync&#39;) IS 1
1355 ), seenStatus NUMBER default 0, storyDistributionListId STRING, expiresAt INT
1356 GENERATED ALWAYS
1357 AS (ifnull(
1358 expirationStartTimestamp + (expireTimer * 1000),
1359 9007199254740991
1360 )), shouldAffectActivity INTEGER
1361 GENERATED ALWAYS AS (
1362 type IS NULL
1363 OR
1364 type NOT IN (
1365 &#39;change-number-notification&#39;,
1366 &#39;contact-removed-notification&#39;,
1367 &#39;conversation-merge&#39;,
1368 &#39;group-v1-migration&#39;,
1369 &#39;keychange&#39;,
1370 &#39;message-history-unsynced&#39;,
1371 &#39;profile-change&#39;,
1372 &#39;story&#39;,
1373 &#39;universal-timer-notification&#39;,
1374 &#39;verified-change&#39;
1375 )
1376 ), shouldAffectPreview INTEGER
1377 GENERATED ALWAYS AS (
1378 type IS NULL
1379 OR
1380 type NOT IN (
1381 &#39;change-number-notification&#39;,
1382 &#39;contact-removed-notification&#39;,
1383 &#39;conversation-merge&#39;,
1384 &#39;group-v1-migration&#39;,
1385 &#39;keychange&#39;,
1386 &#39;message-history-unsynced&#39;,
1387 &#39;profile-change&#39;,
1388 &#39;story&#39;,
1389 &#39;universal-timer-notification&#39;,
1390 &#39;verified-change&#39;
1391 )
1392 ), isUserInitiatedMessage INTEGER
1393 GENERATED ALWAYS AS (
1394 type IS NULL
1395 OR
1396 type NOT IN (
1397 &#39;change-number-notification&#39;,
1398 &#39;contact-removed-notification&#39;,
1399 &#39;conversation-merge&#39;,
1400 &#39;group-v1-migration&#39;,
1401 &#39;group-v2-change&#39;,
1402 &#39;keychange&#39;,
1403 &#39;message-history-unsynced&#39;,
1404 &#39;profile-change&#39;,
1405 &#39;story&#39;,
1406 &#39;universal-timer-notification&#39;,
1407 &#39;verified-change&#39;
1408 )
1409 ), mentionsMe INTEGER NOT NULL DEFAULT 0, isGroupLeaveEvent INTEGER
1410 GENERATED ALWAYS AS (
1411 type IS &#39;group-v2-change&#39; AND
1412 json_array_length(json_extract(json, &#39;$.groupV2Change.details&#39;)) IS 1 AND
1413 json_extract(json, &#39;$.groupV2Change.details[0].type&#39;) IS &#39;member-remove&#39; AND
1414 json_extract(json, &#39;$.groupV2Change.from&#39;) IS NOT NULL AND
1415 json_extract(json, &#39;$.groupV2Change.from&#39;) IS json_extract(json, &#39;$.groupV2Change.details[0].aci&#39;)
1416 ), isGroupLeaveEventFromOther INTEGER
1417 GENERATED ALWAYS AS (
1418 isGroupLeaveEvent IS 1
1419 AND
1420 isChangeCreatedByUs IS 0
1421 ), callId TEXT
1422 GENERATED ALWAYS AS (
1423 json_extract(json, &#39;$.callId&#39;)
1424 ));
1425 CREATE TABLE sqlite_stat4(tbl,idx,neq,nlt,ndlt,sample);
1426 CREATE TABLE jobs(
1427 id TEXT PRIMARY KEY,
1428 queueType TEXT STRING NOT NULL,
1429 timestamp INTEGER NOT NULL,
1430 data STRING TEXT
1431 );
1432 CREATE TABLE reactions(
1433 conversationId STRING,
1434 emoji STRING,
1435 fromId STRING,
1436 messageReceivedAt INTEGER,
1437 targetAuthorAci STRING,
1438 targetTimestamp INTEGER,
1439 unread INTEGER
1440 , messageId STRING);
1441 CREATE TABLE senderKeys(
1442 id TEXT PRIMARY KEY NOT NULL,
1443 senderId TEXT NOT NULL,
1444 distributionId TEXT NOT NULL,
1445 data BLOB NOT NULL,
1446 lastUpdatedDate NUMBER NOT NULL
1447 );
1448 CREATE TABLE unprocessed(
1449 id STRING PRIMARY KEY ASC,
1450 timestamp INTEGER,
1451 version INTEGER,
1452 attempts INTEGER,
1453 envelope TEXT,
1454 decrypted TEXT,
1455 source TEXT,
1456 serverTimestamp INTEGER,
1457 sourceServiceId STRING
1458 , serverGuid STRING NULL, sourceDevice INTEGER, receivedAtCounter INTEGER, urgent INTEGER, story INTEGER);
1459 CREATE TABLE sendLogPayloads(
1460 id INTEGER PRIMARY KEY ASC,
1461
1462 timestamp INTEGER NOT NULL,
1463 contentHint INTEGER NOT NULL,
1464 proto BLOB NOT NULL
1465 , urgent INTEGER, hasPniSignatureMessage INTEGER DEFAULT 0 NOT NULL);
1466 CREATE TABLE sendLogRecipients(
1467 payloadId INTEGER NOT NULL,
1468
1469 recipientServiceId STRING NOT NULL,
1470 deviceId INTEGER NOT NULL,
1471
1472 PRIMARY KEY (payloadId, recipientServiceId, deviceId),
1473
1474 CONSTRAINT sendLogRecipientsForeignKey
1475 FOREIGN KEY (payloadId)
1476 REFERENCES sendLogPayloads(id)
1477 ON DELETE CASCADE
1478 );
1479 CREATE TABLE sendLogMessageIds(
1480 payloadId INTEGER NOT NULL,
1481
1482 messageId STRING NOT NULL,
1483
1484 PRIMARY KEY (payloadId, messageId),
1485
1486 CONSTRAINT sendLogMessageIdsForeignKey
1487 FOREIGN KEY (payloadId)
1488 REFERENCES sendLogPayloads(id)
1489 ON DELETE CASCADE
1490 );
1491 CREATE TABLE preKeys(
1492 id STRING PRIMARY KEY ASC,
1493 json TEXT
1494 , ourServiceId NUMBER
1495 GENERATED ALWAYS AS (json_extract(json, &#39;$.ourServiceId&#39;)));
1496 CREATE TABLE signedPreKeys(
1497 id STRING PRIMARY KEY ASC,
1498 json TEXT
1499 , ourServiceId NUMBER
1500 GENERATED ALWAYS AS (json_extract(json, &#39;$.ourServiceId&#39;)));
1501 CREATE TABLE badges(
1502 id TEXT PRIMARY KEY,
1503 category TEXT NOT NULL,
1504 name TEXT NOT NULL,
1505 descriptionTemplate TEXT NOT NULL
1506 );
1507 CREATE TABLE badgeImageFiles(
1508 badgeId TEXT REFERENCES badges(id)
1509 ON DELETE CASCADE
1510 ON UPDATE CASCADE,
1511 &#39;order&#39; INTEGER NOT NULL,
1512 url TEXT NOT NULL,
1513 localPath TEXT,
1514 theme TEXT NOT NULL
1515 );
1516 CREATE TABLE storyReads (
1517 authorId STRING NOT NULL,
1518 conversationId STRING NOT NULL,
1519 storyId STRING NOT NULL,
1520 storyReadDate NUMBER NOT NULL,
1521
1522 PRIMARY KEY (authorId, storyId)
1523 );
1524 CREATE TABLE storyDistributions(
1525 id STRING PRIMARY KEY NOT NULL,
1526 name TEXT,
1527
1528 senderKeyInfoJson STRING
1529 , deletedAtTimestamp INTEGER, allowsReplies INTEGER, isBlockList INTEGER, storageID STRING, storageVersion INTEGER, storageUnknownFields BLOB, storageNeedsSync INTEGER);
1530 CREATE TABLE storyDistributionMembers(
1531 listId STRING NOT NULL REFERENCES storyDistributions(id)
1532 ON DELETE CASCADE
1533 ON UPDATE CASCADE,
1534 serviceId STRING NOT NULL,
1535
1536 PRIMARY KEY (listId, serviceId)
1537 );
1538 CREATE TABLE uninstalled_sticker_packs (
1539 id STRING NOT NULL PRIMARY KEY,
1540 uninstalledAt NUMBER NOT NULL,
1541 storageID STRING,
1542 storageVersion NUMBER,
1543 storageUnknownFields BLOB,
1544 storageNeedsSync INTEGER NOT NULL
1545 );
1546 CREATE TABLE groupCallRingCancellations(
1547 ringId INTEGER PRIMARY KEY,
1548 createdAt INTEGER NOT NULL
1549 );
1550 CREATE TABLE IF NOT EXISTS &#39;messages_fts_data&#39;(id INTEGER PRIMARY KEY, block BLOB);
1551 CREATE TABLE IF NOT EXISTS &#39;messages_fts_idx&#39;(segid, term, pgno, PRIMARY KEY(segid, term)) WITHOUT ROWID;
1552 CREATE TABLE IF NOT EXISTS &#39;messages_fts_content&#39;(id INTEGER PRIMARY KEY, c0);
1553 CREATE TABLE IF NOT EXISTS &#39;messages_fts_docsize&#39;(id INTEGER PRIMARY KEY, sz BLOB);
1554 CREATE TABLE IF NOT EXISTS &#39;messages_fts_config&#39;(k PRIMARY KEY, v) WITHOUT ROWID;
1555 CREATE TABLE edited_messages(
1556 messageId STRING REFERENCES messages(id)
1557 ON DELETE CASCADE,
1558 sentAt INTEGER,
1559 readStatus INTEGER
1560 , conversationId STRING);
1561 CREATE TABLE mentions (
1562 messageId REFERENCES messages(id) ON DELETE CASCADE,
1563 mentionAci STRING,
1564 start INTEGER,
1565 length INTEGER
1566 );
1567 CREATE TABLE kyberPreKeys(
1568 id STRING PRIMARY KEY NOT NULL,
1569 json TEXT NOT NULL, ourServiceId NUMBER
1570 GENERATED ALWAYS AS (json_extract(json, &#39;$.ourServiceId&#39;)));
1571 CREATE TABLE callsHistory (
1572 callId TEXT PRIMARY KEY,
1573 peerId TEXT NOT NULL, -- conversation id (legacy) | uuid | groupId | roomId
1574 ringerId TEXT DEFAULT NULL, -- ringer uuid
1575 mode TEXT NOT NULL, -- enum &quot;Direct&quot; | &quot;Group&quot;
1576 type TEXT NOT NULL, -- enum &quot;Audio&quot; | &quot;Video&quot; | &quot;Group&quot;
1577 direction TEXT NOT NULL, -- enum &quot;Incoming&quot; | &quot;Outgoing
1578 -- Direct: enum &quot;Pending&quot; | &quot;Missed&quot; | &quot;Accepted&quot; | &quot;Deleted&quot;
1579 -- Group: enum &quot;GenericGroupCall&quot; | &quot;OutgoingRing&quot; | &quot;Ringing&quot; | &quot;Joined&quot; | &quot;Missed&quot; | &quot;Declined&quot; | &quot;Accepted&quot; | &quot;Deleted&quot;
1580 status TEXT NOT NULL,
1581 timestamp INTEGER NOT NULL,
1582 UNIQUE (callId, peerId) ON CONFLICT FAIL
1583 );
1584 [ dropped all indexes to save space in this blog post ]
1585 CREATE TRIGGER messages_on_view_once_update AFTER UPDATE ON messages
1586 WHEN
1587 new.body IS NOT NULL AND new.isViewOnce = 1
1588 BEGIN
1589 DELETE FROM messages_fts WHERE rowid = old.rowid;
1590 END;
1591 CREATE TRIGGER messages_on_insert AFTER INSERT ON messages
1592 WHEN new.isViewOnce IS NOT 1 AND new.storyId IS NULL
1593 BEGIN
1594 INSERT INTO messages_fts
1595 (rowid, body)
1596 VALUES
1597 (new.rowid, new.body);
1598 END;
1599 CREATE TRIGGER messages_on_delete AFTER DELETE ON messages BEGIN
1600 DELETE FROM messages_fts WHERE rowid = old.rowid;
1601 DELETE FROM sendLogPayloads WHERE id IN (
1602 SELECT payloadId FROM sendLogMessageIds
1603 WHERE messageId = old.id
1604 );
1605 DELETE FROM reactions WHERE rowid IN (
1606 SELECT rowid FROM reactions
1607 WHERE messageId = old.id
1608 );
1609 DELETE FROM storyReads WHERE storyId = old.storyId;
1610 END;
1611 CREATE VIRTUAL TABLE messages_fts USING fts5(
1612 body,
1613 tokenize = &#39;signal_tokenizer&#39;
1614 );
1615 CREATE TRIGGER messages_on_update AFTER UPDATE ON messages
1616 WHEN
1617 (new.body IS NULL OR old.body IS NOT new.body) AND
1618 new.isViewOnce IS NOT 1 AND new.storyId IS NULL
1619 BEGIN
1620 DELETE FROM messages_fts WHERE rowid = old.rowid;
1621 INSERT INTO messages_fts
1622 (rowid, body)
1623 VALUES
1624 (new.rowid, new.body);
1625 END;
1626 CREATE TRIGGER messages_on_insert_insert_mentions AFTER INSERT ON messages
1627 BEGIN
1628 INSERT INTO mentions (messageId, mentionAci, start, length)
1629
1630 SELECT messages.id, bodyRanges.value -&gt;&gt; &#39;mentionAci&#39; as mentionAci,
1631 bodyRanges.value -&gt;&gt; &#39;start&#39; as start,
1632 bodyRanges.value -&gt;&gt; &#39;length&#39; as length
1633 FROM messages, json_each(messages.json -&gt;&gt; &#39;bodyRanges&#39;) as bodyRanges
1634 WHERE bodyRanges.value -&gt;&gt; &#39;mentionAci&#39; IS NOT NULL
1635
1636 AND messages.id = new.id;
1637 END;
1638 CREATE TRIGGER messages_on_update_update_mentions AFTER UPDATE ON messages
1639 BEGIN
1640 DELETE FROM mentions WHERE messageId = new.id;
1641 INSERT INTO mentions (messageId, mentionAci, start, length)
1642
1643 SELECT messages.id, bodyRanges.value -&gt;&gt; &#39;mentionAci&#39; as mentionAci,
1644 bodyRanges.value -&gt;&gt; &#39;start&#39; as start,
1645 bodyRanges.value -&gt;&gt; &#39;length&#39; as length
1646 FROM messages, json_each(messages.json -&gt;&gt; &#39;bodyRanges&#39;) as bodyRanges
1647 WHERE bodyRanges.value -&gt;&gt; &#39;mentionAci&#39; IS NOT NULL
1648
1649 AND messages.id = new.id;
1650 END;
1651 sqlite&gt;
1652 &lt;/pre&gt;
1653
1654 &lt;p&gt;Finally I have the tool needed to inspect and process Signal
1655 messages that I need, without using the vendor provided client. Now
1656 on to transforming it to a more useful format.&lt;/p&gt;
1657
1658 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
1659 activities, please send Bitcoin donations to my address
1660 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
1661 </description>
1662 </item>
1663
1664 </channel>
1665 </rss>