The flatpak is built after the tests for pull requests, when started by
hand and for a pushed tag X.Y.Z. Only the tag's run publishes: the
flatpak to the Catcrafts flatpak repository as its stable branch, the
app's ref file beside the repository with the repository's key in it —
the checkout's file, read as the build user like every file of the
checkout, made before anything is published, so a file that cannot carry
the key publishes nothing, and moved into place after it — and release
X.Y.Z on the forge with the metainfo's notes, the bundle and that ref
file. A push to main without a tag runs nothing. That is the release
model of Crafter.Build 6: every push to main is a release, made by the
tag the owner signs and pushes with it. packaging/release-version.sh
makes that workflow's checks — the tag is the version of the app and of
the metainfo's newest release, annotated and signed by the owner as
Forgejo verifies it, on main, and newer than every release published —
and in every run checks the app's version against the metainfo's, as the
version's comment in Model.cppm now says. Release runs share a
concurrency group, so one queues behind another.
Two jobs, by trust: check builds a pull request or a run by hand with
neither the published repository nor its key, publish builds a pushed
tag, and only its volumes feed what is signed. Both run on the
organisation's privileged flatpak runner: check cold, with no host
volume; publish with the four volumes it mounts — the crafter-build
installation the organisation's publish jobs share, this app's own
cache, the repository and the key — which the runner's config must
allow. It publishes into the repository Crafter.Build's and
Crafter.Review's workflows publish to, under the lock each of them holds
while it commits and updates the summary, signed with the same key,
which stays on the runner host, and keeps its bundle as an artifact. The
pacman and flatpak downloads get five tries, 30 s apart: Flathub's CDN
and Arch's Fastly mirror answer 502 now and then, flatpak reports a
summary it could not fetch as a missing runtime, and a mirror answering
502 can fail a pacman transaction even with another mirror behind it.
The README says how to install it and how to stop it starting at login;
AGENTS.md describes CI, a release, what guards the volumes and which of
them the runner must allow, and names what a released copy leaves on a
phone that later releases keep good: the stored rows and their
enumerators, the conversation key, the app id and the login entry's
command, the instance's interface.
crafter-build cross-compiles the executable for aarch64, which on an
x86_64 machine needs no emulation, and flatpak's build commands assemble
the flatpak; there is no flatpak-builder manifest.
make-flatpak-sysroot.sh makes the sysroot: the aarch64 Freedesktop Sdk
26.08 with LLVM's libc++ of the release crafter-build carries (23.1.2,
the tarball and hash of Crafter.Build's manifest), built for aarch64.
build-flatpak.sh builds the executable against it for generic armv8-a
and assembles it on the Platform 26.08 with that libc++, libc++abi and
LLVM's libunwind in /app/lib: the Platform has no libc++, and its
libunwind is libunwind 8. It fails when the executable or a bundled
library needs a library neither the Platform nor /app/lib has, and when
one of them links libunwind 8, which libc++'s -lunwind found first until
the sysroot dropped its link name. The executable it packages is the
build it just ran: the output directory's name ends in a hash of the
configuration, so an older variant (another sysroot, --debug, --local)
left in bin/ is removed first. make-flatpak-sysroot.sh tries each
download five times, 30 s apart: Flathub's CDN answers 502 now and then.
The sandbox gets Wayland, the GPU, net.catcrafts.IMS1 on the system bus
and org.freedesktop.Notifications on the session bus. The metainfo's
content rating declares the app's chat (OARS social-chat intense:
uncontrolled texting between users), as the baseline Chatty's does, for
the software centres and parental controls that read it, and recommends
a display of 360 logical pixels or more — the phone screen the window is
drawn for; a recommendation, not a requirement. The metainfo's one
release is 0.0.0, and the app's version, 0.1.0 in the skeleton, is set
to it: the version's comment in Model.cppm says a release moves the two
together. AGENTS.md's SPDX rule says what the metainfo carries instead
of the two SPDX lines: AppStream's single CC0-1.0 line.
The flatpak carries the licences of what it ships under
/app/share/licenses/net.catcrafts.ImsdMessages: the app's and the font's,
those of the Crafter libraries it links statically and of the code they
bring along (packaging/licenses/, with a NOTICE naming what each text
covers), and LLVM's for its runtime libraries, which
make-flatpak-sysroot.sh keeps beside libc++.
Crafter.Graphics vendors libevdev since dfb70bc and links it statically:
its gamepad backend compiles against its own copy, which comes first on
the include path, and the executable needs no libevdev.so. The prefix
build-libevdev.sh made, the include and library paths project.cpp added
for libevdev and the executable's rpath into ~/.cache are left with
nothing to do, so they go.
net.catcrafts.ImsdMessages.desktop (Messages; Exec imsd-messages %u; the
sms: URI scheme; X-KDE-FormFactor and X-Purism-FormFactor) and a scalable
icon.
Both carry the two SPDX lines: the desktop entry as `#` comments before
its group, the icon after its XML declaration; AGENTS.md's rule says
where the lines go in such files.
The crafter-build Flatpak's SDK ships no libevdev, headers or library,
and neither does the Freedesktop Platform, while Crafter.Graphics's
gamepad backend includes and links it. The script builds the release
tarball (checksum pinned) with the SDK's meson into a prefix.
Tested: run inside the sandbox on the workstation, the prefix holds
libevdev.so.2.3.0 and libevdev-1.0/libevdev/libevdev.h.