-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.xml
More file actions
594 lines (583 loc) · 47.9 KB
/
index.xml
File metadata and controls
594 lines (583 loc) · 47.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Pixels</title>
<link>https://bbhtt.in/</link>
<description>Recent content on Pixels</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<copyright>CC BY-NC-SA 4.0</copyright>
<lastBuildDate>Wed, 11 Mar 2026 15:48:43 +0530</lastBuildDate>
<atom:link href="https://bbhtt.in/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Diary#1</title>
<link>https://bbhtt.in/posts/diary-1/</link>
<pubDate>Wed, 11 Mar 2026 15:48:43 +0530</pubDate>
<guid>https://bbhtt.in/posts/diary-1/</guid>
<description><p>This is going to be the first post in what might become a series of
occasional status updates or something like a personal diary. I might
overshare or ramble a bit at times and there generally won&rsquo;t be anything
particularly important or interesting here.</p>
<p>I&rsquo;ve been meaning to write something like this for a while now, but
never really found the time or motivation to actually do it. I kind of
always liked the idea of keeping a record of what&rsquo;s going on in my
life - my thoughts, experiences, and small updates. It feels nice to
know that someday I might be able to look back at these posts and
recollect. It also feels nice to share these thoughts, even though I
don&rsquo;t really know who the audience (apart from me) is going to be — if
anyone.</p>
<p>I guess I will start this by writing about my health.</p>
<p>I&rsquo;ve generally been healthy all my life. Apart from the usual seasonal
fevers or occasional stomach issues, I&rsquo;ve never really had any health
problems that I can remember. As a result I guess I&rsquo;ve never did any
regular checkups or tried to be consciously healthy like doing
exercises. Things changed a bit last November (2025). I developed a
fever just before winter was approaching, but this time to my
surprise it didn&rsquo;t come with the usual set of symptoms like runny nose
or cold. I didn&rsquo;t think much of it at first and took some paracetamol.
But after 3-4 days it wasn&rsquo;t going away and I got a little scared. So I
went to a physician to get it checked out. During the checkup he measured
my blood pressure and the result surprised both of us - 150/110 mmHg.
That was unusually high for someone like my age even with a fever. He
prescribed me some medication for blood pressure along with treatment
for the fever. The fever itself went away after about a week - it was a
false alarm, but the bigger problem was my high blood pressure. I got
scared a bit more. I took the BP medicine for a week but I was a bit
hesitant to continue it after that. I decided to get a second opinion
a month later. That time my blood pressure measured to be 160/80 mmHg,
which again, was high. However, after discussing things further, the
doctor suggested it might be too early to jump straight to
regular medication. There was also the possibility of me having
whitecoat syndrome. He recommended that I try out some lifestyle changes
first to &ldquo;manage&rdquo; (see if it naturally decreases) the high BP - things
like regular walks, exercise etc. for 3-4 months, after which I was
supposed to do a 24-hour ABPM test. So I&rsquo;ve been doing morning walks for
the last three months or so almost daily. I usually walk around 10–12 km
a day and I track it in the Google Fit app, which says I&rsquo;ve logged about
922515 steps over the last four months. It comes out to roughly 7700
steps per day on average which is quite a jump from previously doing
almost nothing. Unfortunately I seem to have strained a tendon in my
right leg, probably from overdoing it, so I haven&rsquo;t walked at all this
month. Hopefully it will recover by next month. I also completed the
ABPM test last week. The daytime and nighttime averages came out to be
124/80 mmHg and 123/75 mmHg and at at the clinic it was 140/80 mmHg. It&rsquo;s
still a bit on the higher side but it <em>has</em> gone down in the last three
months. I&rsquo;ve been also trying to &ldquo;de-stress&rdquo; in various ways like
reducing my &ldquo;online&rdquo; time (more on that later). Hopefully things turn
out to be ok.</p>
<p>The next part is going to be a bit about my work and Ph.D.</p>
<p>The latter has been stressful and frustrating lately for various
reasons, I won&rsquo;t really get into. I did manage to submit my first paper
to IJB last week. The review process takes quite a bit of time, so I&rsquo;ll
have to wait and see how that goes. In the meantime, I&rsquo;ve also been
working on two more papers. One of them is essentially finished and I&rsquo;ve
sent it to my guide for feedback while the other one, I&rsquo;ve just started
working on. This semester I&rsquo;m also teaching a course on introductory
ODEs and PDEs. I finished the ODE portion of the course last week. I
used SL Ross&rsquo; <em>Introduction to Ordinary Differential Equations</em> as a
reference which is a pretty standard introductory text on this. We
covered definition, formation, classification and existence-uniqueness
theorems in January (2026). For first order linear ODEs we covered
separable, homogenous, exact and Bernoulli differential equations and
for second order ODEs (both variable and constant coefficients,
homogenous and non-homogenous) we did the methods of reduction of order,
variation of parameters, Euler-Cauchy equations and power series
solutions. Personally, I find the method of variation of parameters to be
particularly useful so I heavily relied on it. Some people find it to
be computationally lengthy, but it can be applied to a wide range of
problems and in my opinion, learning a more or less general method like
that is much better for the longer term. The mid-semester exams happened
last week, so I now have a pile of 40 or 50 answer scripts waiting to be
graded.</p>
<p>The next part is about the FOSS stuff I usually do. Most of it can
roughly be grouped into three areas - Flathub, Flatpak, and the
Freedesktop SDK.</p>
<p>A large portion of my time related to Flathub goes into the
main Flathub repository mostly
reviewing submissions. I think I started doing this around 2022, and at
that time there were three of us reviewing - me, Bart, and Hub. Things
changed over time, and reviewing hundreds of submissions every month has
its tax to pay. So for the past couple of years it has mostly been just
me and Hub handling all the review work. This would normally have been
fine if not for the constant barrage of the absolute worst, lowest
quality AI-generated submission PRs that we get. Reviewing these is
hugely frustrating and downright infuriating. Closing them often leads
to people sending emails, matrix pings/DMs or opening more PRs, which
eventually escalates into arguments and bans. I don&rsquo;t think anyone
deserves to deal with this. I don&rsquo;t really have a problem with people
using AI as a tool to assist them, but alas what we usually end up
getting is full-on AI slop without <em>any</em> real human thought or input. I
try to be reasonable but it has been very frustrating. I&rsquo;ve developed and
maintain a number of GitHub actions in that repository (and in
flathub-infra org) to automate parts of the review process. The
automation helps, but a large portion of the submissions are still
difficult to filter automatically and need to be reviewed manually. One
of these actions is currently a fairly large shell script. At one point
I started converting it to Python, but I ended up dropping the ball on
it. I intend to pick it up again at at some point. All of this has also
made me lose some of the implicit trust (whatever that means) I used to
have. I tend to be much stricter when reviewing and accepting
submissions. Looking at the trend of new submissions being accepted, it
has noticeably decreased around the time I took over: 674 in 2022, 672
in 2023, 562 in 2024 and around 355 in 2025. The other large time sink
here is dealing with various &ldquo;infra&rdquo; issues and requests people open,
reviewing moderation requests (looking at the DB I reviewed almost 10x
more than anyone else), maintaining a bunch of Flatpaks (around 19)
and whatever random issues people ping me on.</p>
<p>Dealing with the so-called &ldquo;Fedora drama&rdquo; in parallel with all of this
has also been quite frustrating. People can only take so much constant
criticism and nitpicking from the sidelines. I don&rsquo;t think Fedora&rsquo;s
philosophy (or that of similar distributions) is ever going to fully
align with Flathub&rsquo;s, since to me, the differences exist at a fundamental
level. That said, I do think both sides could still take inspiration
from each other and adapt where it makes sense. Ideally, changes like
this should happen organically over time and a small volunteer-run
project maintained by 4–5 people shouldn&rsquo;t be publicly criticized by
&ldquo;public figures&rdquo;. Anyways&hellip;</p>
<p>Moving on to flatpak-builder-lint, I&rsquo;m still maintaining it mostly
solo. I took over the project in its early days, and at the time it was
quite controversial. For the first 5–6 years, Flathub had very minimal
build validation, so people weren&rsquo;t really used to their builds being
blocked. When the linter started introducing many new checks
(and therefore new breaking changes), it naturally caused a lot of
frustration. On top of that, the linter CI wasn&rsquo;t fully testing everything
at the time, which led to additional breakages. Over the past couple of
years I&rsquo;ve tried to stabilise things by improving the existing
checks, adding many new ones, removing some vague or problematic
ones, and introducing proper CI and test coverage. Whenever breaking
changes were introduced, I tried to communicate them by opening issues
on affected repositories - at times that meant opening 70–80 issues. I
I think all of that effort paid off. Over the past few months I haven&rsquo;t
I really had to add a lot of new code, and the complaints have stopped.
These days the biggest time sink there is reviewing exception PRs, which
I&rsquo;m again at it mostly alone. Often this involves looking at the app&rsquo;s
code, running the application itself, knowing about Flatpak and portal
developments including what random libraries or frameworks support,
asking maintainers questions for context, and making &ldquo;judgement calls&rdquo;.</p>
<p>Moving on to the documentation repository, there isn&rsquo;t much to say
here, except that I&rsquo;m currently the only person actively writing and
maintaining the docs. Over the past few year I’ve added a large number
of maintenance documents, new policies, inclusion criteria,
requirements, and other guidelines. Some of the documentation ends up
being fairly technical, since writing it often requires familiarity with
the tooling and the underlying code. Similarly, only reviewers who are
familiar with the submission process can realistically write the
submission and review criteria. I think I’ve done a decent job of
keeping everything up-to-date.</p>
<p>Moving on to flatpak-external-data-checker, these days it has more or
less turned into another low (read &rsquo;no&rsquo;) activity repository, since as
far as I can tell Endless no longer uses it internally, and one of the
main maintainers have also become inactive. Over the past year or so I
did a couple of sweeps through the issue tracker and landed a number of
fixes and new features, with reviews from Will. A year is a long time
though, and while writing this I opened the commit log in another tab
to remind myself what exactly I worked on. Looking at it now, it seems
that most of it is again just me. I guess I&rsquo;ll simply refer future me
at it too.</p>
<p>The next thing is flathub-repro-checker, which I came up with last year.
The fact that Flathub stores an application&rsquo;s sources after the build
and that it can be rebuilt from those exact sources with the generated
manifest was &ldquo;common knowledge&rdquo; to me. However, the process itself was
tedious and largely manual. Since I had previously worked on a large
number of reproducibility fixes for Freedesktop SDK, and that project
used a tool to automate the process, I wanted something similar for
Flathub as well. The initial version was a fairly large ~1200 LoC
Python script up until version 0.1.10. Recently, I finally managed to
find the time to refactor it into a proper project. Bart and I also
discussed how it could be deployed for Flathub. I think he ended up doing
most of the deployment and &ldquo;hooking&rdquo; work there but now there is a nice
reproducibility dashboard.</p>
<p>The next big change for Flathub last year was switching to
vorarbeiter. Bart wrote all the code for it. I worked on getting the
linter Docker image ready to be used in the Vorarbeiter pipelines. Some
of that involved patching flatpak and flatpak-builder at times. I also
reviewed some of the initial vorarbeiter code and pointed out a few
security issues. Once it was deployed and working, I added a number of
smaller features, such as improvements around PR annotations, handling
cancelled builds, some bot commands. Since then I&rsquo;ve continued to push
occasional fixes whenever issues come up - usually discovered through
random pings, the Sentry dashboard, or other reports. I don&rsquo;t remember
most of it now. Apart from all these, pretty much every repo in the
flathub-infra org was touched by me in one way or another last year.</p>
<p>Moving on to Freedesktop SDK, while Codethink helps with all of the
infrastructure and maintains the BuildStream (and related tooling), most
of the general maintenance of the SDK itself has been handled by about
3–4 volunteers (including me) over the past few years. One of those
maintainers unfortunately became inactive last year, and since then I&rsquo;ve
again been handling a large portion of the general maintenance on my
own. This includes working on several Freedesktop SDK–related projects,
such as the mesa-git extension, the freedesktop-sdk docker images,
the binary seed, and various other bits of tooling. Most of it is
generally uninteresting but tedious work like fixing builds, backporting
patches (security patches), fixing CI, deciding on ABI breaks and
freezes. Sometimes I end up having to fix some Buildstream plugin as
well. I also developed a couple of tooling to help me with automating
some of this which lives in the freedesktop-sdk-utils and the main
freedesktop-sdk repo. One particularly large change that happened last
year was the license work. Among the SDK maintainers it was generally
known that we weren&rsquo;t installing license files for built modules.
However, we weren&rsquo;t really aware of the potential legal implications
(if any). The &ldquo;Fedora drama&rdquo; led to a number of distribution maintainers
taking a closer look at the project, and the issue of missing license
files ended up being amplified a lot. When the confidential issue was
opened about it, there was a sense of urgency around addressing it. At
the time I wasn&rsquo;t aware that This was a direct consequence of that
situation. If I had known, I probably wouldn&rsquo;t have been as enthusiastic
about jumping in. Nevertheless, I ended up creating the initial framework
for handling license installation, with input from Adrian and a few
other people. This was happening in parallel with the upcoming 25.08
release and we even had to revive branches from two or three years ago
to fix them. In the end I ended up doing a large portion of that work.</p>
<p>Moving on to Flatpak-related work, most Flatpak projects have been
fairly dormant for several years, mainly because many of the original
maintainers moved on to other projects. As part of the license work
mentioned earlier, there was interest in bringing the same license
installation framework to flatpak-builder. Sebastian implemented the
feature, and through a series of events I ended up reviewing, merging,
and creating a release with it. Since Flathub had accumulated a number
of patches over time, I also took the opportunity to upstream them one
by one. That more or less marked the beginning of my involvement
there. Since then I ended up doing a bit of work around
flatpak-builder, making several releases, introducing the stable/unstable
release policy, cleaning up the issue tracker, fixing various bugs,
merging PRs that had been sitting around for years, and adding a bunch
of new features along the way. That also somehow spilled over into the
flatpak itself. I ended up reviewing a number of PRs there, merged some
fixes, cleaned up parts of the issue tracker, and reviewed a couple of
security patches. Two other things that take some of my time are
documentation work and maintaining most of the generators in the
flatpak-builder-tools. Since many of the original maintainers are no
longer active, I&rsquo;ve ended up maintaining most of the generators there.
Last year I added linting, type-checking, and CI improvements for many
of them, fixed several bugs in the node, pip, dotnet, and cargo
generators, reviewed and merged the new generator for deno, and I&rsquo;m
currently reviewing the pnpm generator.</p>
<p>That concludes this part about the FOSS work I&rsquo;ve been doing. I&rsquo;ve been
involved in this for about 4–5 years now, all in my free time, and I&rsquo;d
like to continue doing it for free in my own time. Lately though, the
amount of friction and frustration has been increasing, and I&rsquo;ve been
trying (and failing) to take some breaks. To &ldquo;de-stress&rdquo;, I&rsquo;ve turned
off notifications for several apps on my phone, and instead of checking
emails daily like I used to, I now let them pile up for a few days
before going through them. This leads to around 300-400 emails a week
but whatever.</p>
<p>After all of the above I hardly get any free time, but whenever I do I
listen to a lot of <a href="https://music.youtube.com/@bbhtt3305"target="_blank" rel="noopener noreferrer">music</a> and
watch Youtube. Sometime in late 2024 I fell into the K-pop rabbit hole
through Blackpink, and since then I’ve been following their music, solo
releases and the pinks on their socials. That also led me to discover
other artists such as Lee Hi, Taeyeon, Bol4, IU, AKMU, and Jeon Somi.
K-pop also led me into watching K-dramas, and over time I&rsquo;ve watched
quite a few <a href="https://mydramalist.com/dramalist/bbhtt/completed"target="_blank" rel="noopener noreferrer">shows</a>.
Right now I&rsquo;m watching <em>Boyfriend on Demand</em>.</p>
<p>Last year I tried to get back into gaming. I bought two controllers
for myself (one of them has TMR sticks) and I bought a bunch of games on
Steam. I have been playing Dead Cells whenever I find time. So far I&rsquo;ve
only managed to reach the Clock Room stage, but it has been fun.</p>
<p>I think that&rsquo;s about it for this post. It ended up being quite a bit
longer than I expected, but it was nice to reflect on things a
a bit.</p></description>
</item>
<item>
<title>Closing the chapter on OpenH264</title>
<link>https://bbhtt.in/posts/closing-the-chapter-on-openh264/</link>
<pubDate>Sat, 22 Mar 2025 18:48:40 +0530</pubDate>
<guid>https://bbhtt.in/posts/closing-the-chapter-on-openh264/</guid>
<description><p>People might have noticed me talking about dropping OpenH264 from
<a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk"target="_blank" rel="noopener noreferrer">Freedesktop SDK</a>.
Here, I&rsquo;ll try to go a bit into the history, the timeline and what led
to the final decision.</p>
<h2 id="a-bit-of-an-introduction">A bit of an introduction</h2>
<p>If you are unfamiliar with the Freedesktop SDK project: it was born out
of the initial <a href="https://github.com/flatpak/freedesktop-sdk-images"target="_blank" rel="noopener noreferrer">1.6 Flatpak runtime image</a>
created by <a href="https://github.com/alexlarsson"target="_blank" rel="noopener noreferrer">Alexander Larsson</a> to
provide a host independent &ldquo;runtime&rdquo; for Flatpaks. Since then, with the
help of <a href="https://www.codethink.co.uk/"target="_blank" rel="noopener noreferrer">Codethink</a> and others, it grew
into an independent project maintained by the community that aims to
provide a &ldquo;A minimal Linux runtime&rdquo;.</p>
<p>Currently that includes the <code>org.freedesktop.{Sdk, Platform}</code>
<a href="https://docs.flatpak.org/en/latest/introduction.html#terminology"target="_blank" rel="noopener noreferrer">Flatpak runtimes</a>,
a bunch of other <a href="https://docs.flatpak.org/en/latest/extension.html"target="_blank" rel="noopener noreferrer">Flatpak extensions</a>
such as the GL (Mesa) extensions, a bootable image stack that includes
things like the Linux kernel, firmware and drivers and a collection
of docker images.</p>
<p>The runtimes (and more broadly the &ldquo;Flatpak&rdquo; stack) form the base for
the <a href="https://gitlab.gnome.org/GNOME/gnome-build-meta/"target="_blank" rel="noopener noreferrer">GNOME</a> and
<a href="https://invent.kde.org/packaging/flatpak-kde-runtime"target="_blank" rel="noopener noreferrer">KDE</a> Flatpak
runtimes which are collectively used by 2000+ Flatpaks, while the
bootable stack along with other parts forms the base for things like
<a href="https://os.gnome.org/"target="_blank" rel="noopener noreferrer">GNOME OS</a>.</p>
<h2 id="some-history">Some history</h2>
<p>H.264 is one of the <a href="https://www.cloudflare.com/learning/video/what-is-h264-avc/"target="_blank" rel="noopener noreferrer">most widely used</a>
codecs today but unfortunately it is patented with several patents
<a href="https://meta.wikimedia.org/wiki/Have_the_patents_for_H.264_MPEG-4_AVC_expired_yet%3F"target="_blank" rel="noopener noreferrer">still active</a>.
Patents like this are a blocker to shipping software dealing with the
codec in the base runtime (since we want it usable by a wide variety of
vendors and free of any legal grey areas) and unfortunately makes life
difficult for everyone involved.</p>
<p>To workaround this and ship working software to users, 6 years ago, in
2019 the precursor to the OpenH264 extension, called the
<a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/commit/1c1d87eb7f1e7952bf79825cfb65225f3a3c3e30"target="_blank" rel="noopener noreferrer">html5-codecs extension</a>
was added to the Freedesktop runtime by Tom Coldrick. The idea was
simple - it would contain support for FFMPEG&rsquo;s internal H.264 decoder
and would be an optional Flatpak extension since we were unable to ship
it in the runtime itself.</p>
<p>Fast-forward a few months, in June 2019, <a href="https://gitlab.com/ramcq"target="_blank" rel="noopener noreferrer">Robert McQueen</a>
opened an <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/815"target="_blank" rel="noopener noreferrer">issue</a>
to include <a href="https://github.com/cisco/openh264"target="_blank" rel="noopener noreferrer">Cisco&rsquo;s OpenH264</a>
(commonly referred as <code>libopenh264</code> too) as an extension to the runtime.</p>
<p><code>libopenh264</code> code is open source but due to the H.264 patents, no
vendor is legally allowed to distribute their own binaries (some vendors
build it themselves and hand it to Cisco but no one made that arrangement
for us). The solution to this was to distribute Cisco&rsquo;s unmodified
binaries directly to the user which would effectively be free of any
royalties but the catch is, the binaries have
<a href="https://www.openh264.org/BINARY_LICENSE.txt"target="_blank" rel="noopener noreferrer">some license restrictions</a>
on them.</p>
<p>So Endless around that time, added <a href="https://docs.flatpak.org/en/latest/module-sources.html#extra-data"target="_blank" rel="noopener noreferrer">extra-data</a>
support to Flatpak. This meant that the Flatpak extension metadata
would only contain an URL to Cisco&rsquo;s binaries, checksums and a &ldquo;recipe&rdquo;
to make a working extension out of it. The binary would be downloaded
on the end user&rsquo;s machine, inside a sandbox and then the &ldquo;recipe&rdquo;
would be executed to create a working extension. This avoids various
&ldquo;redistribution&rdquo; restrictions entirely since we aren&rsquo;t shipping the
binary itself.</p>
<p>However, one last catch remained with this approach. Unless the end user
system has downloaded the extension, a part of the ABI will be missing
from the base runtime itself. Additionally, the extension would also
get mounted to a non-standard location inside the Flatpak sandbox. So to
build something against that we needed a &ldquo;public&rdquo; library that is
included in the runtime itself.</p>
<p>Endless came up with a stub OpenH264 library called <a href="https://github.com/endlessm/noopenh264/"target="_blank" rel="noopener noreferrer">noopenhh264</a>,
as a solution to this. This would be kept ABI/API compatible to the
actual Cisco&rsquo;s OpenH264 library and would live inside the runtime at
<code>$libdir</code> to allow software to link to libopenh264 and provide a
fallback. At runtime, if the user downloads the actual OpenH264
extension, the stub library would get overridden by the library in
extension through Flatpak&rsquo;s ld.so config and voilà, you have a working
OpenH264 setup!</p>
<h2 id="the-start-of-the-openh264-extension">The start of the openh264 extension</h2>
<p>Following the gruelling details above, in August 2019, Tom Coldrick
<a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/1638"target="_blank" rel="noopener noreferrer">again added</a>
this &ldquo;noopenh264&rdquo; library to the runtime and set up the extension point
called <code>org.freedesktop.Platform.openh264</code>.</p>
<p>Around that time, the development of the &ldquo;stub&rdquo; noopenh264 library also
moved under the <a href="https://gitlab.com/freedesktop-sdk/noopenh264"target="_blank" rel="noopener noreferrer">Freedesktop SDK umbrella</a>
while the development of this extra-data extension was going on in a
<a href="https://gitlab.com/freedesktop-sdk/openh264-extension"target="_blank" rel="noopener noreferrer">dedicated repository</a>.</p>
<p>I talked about a &ldquo;recipe&rdquo; of an extra-data Flatpak extension a while
back, which is nothing but a set of commands in a special file called
<code>apply_extra</code> to stage and install the source. As an example, if it
was a <code>.deb</code> it would be a sequence of <code>ar</code> or <code>bsdtar</code> commands to
extract it, then install it inside Flatpak&rsquo;s extra-data prefix.</p>
<p>The catch here is that using any utility like that makes the extension
directly dependent on a particular branch of the Flatpak runtime and thus
the API/ABI provided by it.</p>
<p>As every yearly major release of the Freedesktop runtime is a completely
new ABI, we would need to continuously spin off new branches of the
OpenH264 extension i.e. for version 2.1.0 of libopenh264 we would need
<code>org.freedesktop.Platform.openh264//2.1.0-{18.08, 19.08, 20.08}</code> branches
for the extension and so on. This would make it a bit of an chore to
update the extension in Freedesktop runtime itself and also for
our downstream runtimes.</p>
<p>As a solution to this, a custom <code>apply_extra</code> script was <a href="https://gitlab.com/freedesktop-sdk/openh264-extension/-/commit/8a80eaaab8cd6b6aa7e241e681bdbaeed5632e56"target="_blank" rel="noopener noreferrer">written</a>,
which utilised only a few standard headers and would be <a href="https://gitlab.com/freedesktop-sdk/openh264-extension/-/commit/98601a6bcfd5a287106653bc69e54b58ce619c9e"target="_blank" rel="noopener noreferrer">built statically</a>
against a fixed toolchain.</p>
<p>The meant a bit of complexity, since we aren&rsquo;t allowed to use most
things that would make this process easier but it also meant the final
extension was independent of the runtime API/ABI and was built on top
of &ldquo;NoRuntime&rdquo;.</p>
<h2 id="the-flaws-start-to-show-up">The flaws start to show up</h2>
<p>This entire setup worked quite well for a long time despite some
maintenance issues from Cisco. However there were some flaws.</p>
<p>A while back I told that every vendor is forced to distribute binaries
hosted by Cisco at <code>https://ciscobinary.openh264.org</code>. Unfortunately
<code>ciscobinary.openh264.org</code> is missing a valid SSL certificate
<a href="https://github.com/cisco/openh264/issues/909#issue-34658985"target="_blank" rel="noopener noreferrer">at least since 2014</a>
and Cisco neither supplies GPG signatures nor strong checksums like
SHA-256 for the binary releases.</p>
<p>This meant that we have no way to verify the authenticity of Cisco&rsquo;s
binaries, opening us to various classes of MiTM and supply-chain
vulnerabilities. We reached out to Mozilla and via Fedora/RedHat to get
Cisco to fix this, as one can see the comments on the thread but
nothing ever happened.</p>
<p>More recently (around 2024-2025), this SSL issue meant that the domain
started getting <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/24521#note_2329956598"target="_blank" rel="noopener noreferrer">DNS blocked</a>
and would make the extra-data download fail, botching an install.</p>
<p>Another critical issue was that if upstream did security fixes and then
released them with an ABI break, we couldn&rsquo;t fix it for the Flatpak
runtimes. Distributing binaries directly through extra-data meant there
is no scope for cherry-picking patches and the ABI break meant the new
version would only be able go to a new branch of the runtime.</p>
<p>We didn&rsquo;t really have a choice here. If we dropped this extension
considering the potential flaws, the entirety of the Flatpak user base
would loose H.264 decoding and encoding support, so we had to live with
the setup.</p>
<h2 id="the-start-of-the-codecs-extra-extension">The start of the codecs-extra extension</h2>
<p>Around June 2024 <code>gdk-pixbuf</code> due to a series of security issues,
<a href="https://discourse.gnome.org/t/change-in-the-gdk-pixbuf-loaders-built-by-default-in-2-42-11/21845"target="_blank" rel="noopener noreferrer">dropped support</a>
for a lot of &ldquo;fringe&rdquo; loaders. We immediately noticed the change as
we constantly analyse ABI in stable branches.</p>
<p>To compensate for the dropped loaders, we <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/19916"target="_blank" rel="noopener noreferrer">decided</a>
to add <code>webp, avif, jxl, heif</code> support (with pixbuf loaders) to the
runtime. Around the same time, <a href="https://gitlab.com/wjt"target="_blank" rel="noopener noreferrer">Will Thompson</a>
opened an <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1704"target="_blank" rel="noopener noreferrer">issue</a>
to add <code>libheif</code> to the runtime with the problematic HEIC decoder as a
runtime extension.</p>
<p>Consequently, we decided that yet another extension just for two libheif
plugins is not worth the maintenance effort and these would rather be
in the <code>ffmpeg-full</code> extension (This was the successor to the
<code>html5-codecs</code> extension, created around 2019-2020). So I <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/20268"target="_blank" rel="noopener noreferrer">again</a>
<a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/19942"target="_blank" rel="noopener noreferrer">added</a>
<code>libx265, libde265</code> and the corresponding libheif plugins to the
ffmpeg-full extension. After a few months I also <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/21970"target="_blank" rel="noopener noreferrer">added</a>
<code>libx264</code> to it too as we were already shipping <code>libx265</code> and Cisco&rsquo;s
OpenH264 had suboptimal encoding performance.</p>
<p>I was happy with the result and all of this shipped in Freedesktop SDK
24.08. But some people were unhappy for valid reasons.</p>
<p>When the <code>ffmpeg-full</code> extension was created, due to various concerns
it was never added to the runtime or SDK manifest; it lived as an
optional &ldquo;app&rdquo; extension - meaning app developers would need to add a
<a href="https://docs.flatpak.org/en/latest/extension.html#loading-existing-extensions"target="_blank" rel="noopener noreferrer">short snippet</a>
in their Flatpak manifest to use it.</p>
<p>This was problematic in some ways - sometimes app developers were
unaware of the extension or that they needed it and the app manifest
was missing the snippet that allowed to use the extension. This made
user and developer experience a bit poor. Once we started
shipping <code>libheif</code> in <code>ffmpeg-full</code>, it became slightly more
problematic as the actual libheif library was in the runtime but without
the extension it cannot decode any HEIF/HEIC image. So the extension
was practically mandatory. <a href="https://github.com/tsdgeos"target="_blank" rel="noopener noreferrer">Albert Astals Cid</a>,
part of the team who maintains KDE Flatpaks on Flathub complained about
this and an <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1825"target="_blank" rel="noopener noreferrer">issue was opened by Erick555</a>
to discuss the possibility of making ffmpeg-full a runtime extension.</p>
<p>I was initially reluctant to do this for various reasons and the
situation was again a bit out of our hands (this time due to H.265
patents) but we asked various parties such as Endless and quite
surprisingly it turned out no one really had an objection to making it
a runtime extension or even make it auto-download along with the
runtime.</p>
<p>Along with this change, we decided to rename the <code>ffmpeg-full</code> extension
again, this time to <code>codecs-extra</code> to better reflect the fact that it
will not only contain FFMPEG with patented parts but other libraries
too that deals with patented codecs. This would sort of be an equivalent
to the various &ldquo;meta-packages&rdquo; that distros provide for patented or
restricted codecs.</p>
<p>Thus the seeds were planted and I switched <code>ffmpeg-full</code> to
<code>codecs-extra</code> a <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/24620"target="_blank" rel="noopener noreferrer">month ago</a>.</p>
<p>This is supposed to ship in Freedesktop SDK 25.08. The major change for
app developers is that there is no longer any need to have something
like</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">add-extensions</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">org.freedesktop.Platform.ffmpeg-full</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;24.08&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">directory</span><span class="p">:</span><span class="w"> </span><span class="l">lib/ffmpeg</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">add-ld-path</span><span class="p">:</span><span class="w"> </span><span class="l">.</span><span class="w">
</span></span></span></code></pre></div><p>in the manifest. <code>org.freedesktop.Platform.codecs-extra</code> will be
automatically installed by the runtime and will be available to users.</p>
<h2 id="dropping-the-openh264-extension">Dropping the openh264 extension</h2>
<p>The above <code>codecs-extra</code> change meant that we now didn&rsquo;t really have an
use case for <code>org.freedesktop.Platform.openh264</code> since <code>codecs-extra</code>
had FFMPEG&rsquo;s internal H.264 decoder and the <code>libx264</code> encoder.</p>
<p>So I initially disabled autodownload and considering the various &ldquo;flaws&rdquo;
with OpenH264 discussed above, I <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1834"target="_blank" rel="noopener noreferrer">opened an issue</a>
for planned retirement in 26.08.</p>
<p>This was completely overturned when a <a href="https://github.com/cisco/openh264/security/advisories/GHSA-m99q-5j7x-7m9x"target="_blank" rel="noopener noreferrer">high severity flaw</a>
was discovered in libopenh264 affecting versions 2.5.0 and earlier.</p>
<p>The 23.08 branch of the Freedesktop runtime was locked to 2.2.0 and
upgrading to a fixed version was not possible due to multiple ABI breaks
and SONAME bumps upstream. Patching was also not an option as I said
earlier.</p>
<p>We scrambled to mitigate this. For 23.08, we decided to make an
&ldquo;ABI break&rdquo; and <a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1846"target="_blank" rel="noopener noreferrer">drop the extension</a>
as updating was impossible. So I made a bit of an intimidating <a href="https://discourse.flathub.org/t/upcoming-freedesktop-23-08-runtime-release-will-drop-openh264-extension/9022"target="_blank" rel="noopener noreferrer">announcement</a>.</p>
<p>But we still had 24.08 left which was on 2.4.1 and updating to the fixed
version i.e. 2.6.0 was again blocked due to an ABI bump.</p>
<p>However, looking through the commits between 2.4.1 and 2.6.0 and
analysing the library through libabigail we couldn&rsquo;t find an actual
ABI break that was made and considering Cisco in the past made
unnecessary SONAME bumps, we tried patching the 2.6.0 release to
provide the older ABI.</p>
<p>I <a href="https://gitlab.com/freedesktop-sdk/openh264-extension/-/merge_requests/68"target="_blank" rel="noopener noreferrer">messed</a>
with that venerable apply_extra and wrote a small utility to patch
SONAMEs. But upstream, in time, pointed us to the ABI break
and this idea had to be scrapped entirely. (I later found out why
liabigail was unable to show the ABI break after talking to Dodji
Seketeli, the libabigail maintainer.)</p>
<p>We then <a href="https://github.com/cisco/openh264/issues/3863"target="_blank" rel="noopener noreferrer">asked upstream</a>
to provide a patch release 2.5.1 instead with the old ABI and to our
surprise they did within a few weeks! This shipped in 24.08.15 fixing
the 24.08 branch of the runtime.</p>
<p>After all this debacle and the extra &ldquo;headache&rdquo;, none of us felt
comfortable shipping the openH264 extension anymore. Thus it was
<a href="https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/24871"target="_blank" rel="noopener noreferrer">dropped</a>
for the master branch, which means there won&rsquo;t be any
<code>org.freedesktop.Platform.openh264</code> extension or <code>noopenh264</code> for 25.08+.</p>
<h2 id="epilogue">Epilogue</h2>
<p>Considering all things, I think and hope we made the correct decision
and hopefully the new <code>org.freedesktop.Platform.codecs-extra</code> works
out. <code>libx264, libx265</code> and others are built from source and there
are no binaries or extra-data involved. So we should theoretically be
able to patch and fix any issues that come up in the future.</p>
<p>Apart from all this, I&rsquo;m slightly worried at the prospects of legal
issues cropping up with this setup and also that the new extension
contains &ldquo;too much&rdquo;, but we will have to see where things flow.</p>
<p>As a fun tidbit, I wasn&rsquo;t aware that Fedora was also using our
<code>org.freedesktop.Platform.openh264</code> extension. I caused a bit of work
for them as noopenh264 <a href="https://gitlab.com/freedesktop-sdk/noopenh264/-/commit/2177b9cb3542d0c9ccba4d20e56516118f8e747d"target="_blank" rel="noopener noreferrer">moved home</a>
once again, now to Fedora and they are looking for ways to make their
own OpenH264 extension similar to how we did.</p>
<p>I hope the experience here helps anyone in the future wanting to maintain
such an extension and this will also serve as a reminder to how much
extra work patents like these causes.</p>
<p>Lastly I&rsquo;d like to thank Endless for giving us not only noopenh264 but
also extra-data support in Flatpak that made all this possible;
<a href="https://gitlab.com/TheRealMichaelCatanzaro"target="_blank" rel="noopener noreferrer">Michael Catanzaro</a> and <a href="https://gitlab.com/nanonyme"target="_blank" rel="noopener noreferrer">Seppo Yli-Olli</a>
for maintaining this setup for a long time; <a href="https://gitlab.com/valentindavid"target="_blank" rel="noopener noreferrer">Valentin David</a>
for helping me in the last few days and everyone else who worked on
this ❤️</p></description>
</item>
<item>
<title>Hello, World</title>
<link>https://bbhtt.in/posts/hello-world/</link>
<pubDate>Fri, 05 Apr 2024 09:32:40 +0530</pubDate>
<guid>https://bbhtt.in/posts/hello-world/</guid>
<description><p align="center">
<img src="./cat.png" alt="A cat standing on two legs with one hand on a bed and the other one stretched in the opposite direction - in a stuck position" />
</p>
</description>
</item>
<item>
<title>About</title>
<link>https://bbhtt.in/about/</link>
<pubDate>Fri, 07 Jul 2023 12:44:33 +0530</pubDate>
<guid>https://bbhtt.in/about/</guid>
<description><blockquote>
<p><em>I’m Nobody! Who are you? Are you – Nobody – too? Then there’s a pair of us!</em> ~ Emily Dickinson</p>
</blockquote>
<p>Hello and welcome to my little corner of the internet!</p>
<p>You might know me by my online alias, <em>bbhtt</em>, which is just a blend of
some letters of my real name, Boudhayan Bhattcharya. I live in India and
completed my B.Sc. (Honours) in 2021 and M.Sc. in Mathematics in 2023.
Currently, I&rsquo;m pursuing a Ph.D. in Mathematics. I teach Mathematics
for work and occasionally contribute to <a href="https://en.wikipedia.org/wiki/Free_and_open-source_software"target="_blank" rel="noopener noreferrer">FOSS projects</a>
during my free time.</p>
<p>I love watching <a href="https://letterboxd.com/bbhtt/films/"target="_blank" rel="noopener noreferrer">movies</a>,
TV shows, and <a href="https://anidb.net/user/983003"target="_blank" rel="noopener noreferrer">anime</a>, and I&rsquo;m always
listening to <a href="https://open.spotify.com/user/m18qz71984e1gjbkfbd36zwmi"target="_blank" rel="noopener noreferrer">music</a>.
Although, most of the time, I&rsquo;m lost in some random YouTube binge.</p>
<p>I also try to read books and play some games on <a href="https://steamcommunity.com/id/bbhtt/"target="_blank" rel="noopener noreferrer">Steam</a>
every now and then, and sometimes I mess around with casual online chess
on Lichess.</p>
<p>You can contact me via:</p>
<ul>
<li>Email: <a href="mailto:bbhtt@bbhtt.in">bbhtt@bbhtt.in</a>. My GPG key
is <a href="./bbhtt.pub">D26D 7533 9500 9DB2 B3B2 6094 0C32 51A2 4745 E484</a></li>
<li><a href="https://matrix.org/"target="_blank" rel="noopener noreferrer">[matrix]</a>: <a href="https://matrix.to/#/@bbhtt:matrix.org"target="_blank" rel="noopener noreferrer">@bbhtt:matrix.org</a></li>
<li>IRC: bbhtt on <a href="ircs://irc.libera.chat/bbhtt,isuser">Libera.chat</a>, <a href="ircs://irc.oftc.net/bbhtt,isuser">OFTC</a></li>
</ul>
<p>Unless otherwise stated, all textual content here is licensed under
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"target="_blank" rel="noopener noreferrer">CC BY-NC-SA 4.0</a>.</p>
</description>
</item>
</channel>
</rss>