Sailfish Community News, 2nd November, QMF

Sailfish OS update from Jolla

This fortnight Energy from the Community focuses to the email improvements that are on pipeline. David (flypig) interviewed and summarized changes nicely and it is really awesome to see what’s happen in that front.

The App roundup has once again a nice set of apps. The gPodder originates back to 2013 when old sailor Thomas Perl (thp) ported it for the first time to Sailfish. The Tooterβ as your choice for Sailfish Mastodon app. Then fheroes2 as the game of the fortnight. Finally, FileCase as an alternative app for accessing the filesystem with some great additional features.

Damien (dcaliste) put together once again Repository roundup – thank you Damien.

Finally, it’s good to remind ourselves once in a while regarding forum guidelines. Please read guidelines through if you haven’t done so or just to remind yourself.

Let’s work together and keep on helping each other. Have a great time with the newsletter and enjoy!

Energy from the Community

Longtime readers of the newsletter will recall that back in April 2021 we looked at the work Damien Caliste ( dcaliste ) was doing on QMF — the Qt Messaging Framework — and related software stack.

QMF is an important component for most Sailfish OS users, in that it handles email sending and receiving, attachments and various related operations. The QMF daemon runs in the background and interacts tightly with the email client and notification systems, performing both periodic and always-on syncing to your email server.

As the name implies, QMF is part of the Qt project, is a fully open source component and makes heavy use of the core Qt C++ framework APIs. When we last looked at it Damien was busy ensuring the code successfully passed through the Qt continuous integration pipeline after the introduction of Qt 6. More recently however, Damien has been focusing on email encryption, especially related to the use of GnuPG (the GNU “Pretty Good Privacy” implementation) that can be used for end-to-end encryption, decryption, signing and verifying of emails.

The work was precipitated by szopin who recently recompiled Sequoia-sq for use on Sailfish OS. Official support for PGP has been hampered due to licensing issues surrounding various different versions of the implementation, but Sequoia-sq has the advantage of both being compatible with OpenPGP and having a more suitable licence. As szopin explains, having compiled the executable he contacted Damien to see if this might offer a breakthrough.

I reached out to him as with sequoia-sq compiled and working I thought we finally had a chance at proper PGP support (that’s also GPLv2 licensed and with Rust officially supported, all the stars seemed to align)… Damien very quickly provided a patched libQMFclient.so that made the encrypted attachments show up and I managed to do a bit of hacking (mostly cannibalised qCommand) to make it accept a file URL and register for text files, add a predefined command to run sequoia-sq on the contents and display the result.

Clearly this spark lit a fire as Damien has continued working on integrating the changes more fully into QMF and the email app. As Damien explains, this led to him fixing a broader collection of issues around attachments:

I’ve restarted looking into QMF recently, fixing (yet another) attachment bug.

You can see the changes Damien is proposing in the Qt code review tool. It fixes an issue that prevents some attachment files from being listed in the email application. This happens when the attachment parts in the email aren’t tagged with any content disposition directive (most attachment files will come with a content disposition specifying them as attachments).

Encrypted emails come in the form of an encrypted attachment, part of the RFC 1847 specification. Although QMF doesn’t currently have support for decrypting attachments, it would still be possible to decrypt them manually at the command line (using the GnuPG tools) if the attachments could at least be accessed in their encrypted form. As Damien explains:

Such encrypted messages cannot be handled even with the CLI if needed since the encrypted part is not downloaded and the UI offers no way to do it.

This led Damien to submitting a number of fixes to QMF, nemo-qml-plugin-email and the email client itself in order to allow these messages to be supported.

These should enable the email application to know about encrypted email and expose the encrypted part as an attachment so it can be downloaded like any other and proceed from the CLI.

I also gave a look at extending the plugin API for cryptography in QMF (introduced years ago for signing capabilities) adding functions for decryption… I’ve some code not yet ready for nemo-qml-plugin-email and jolla-email to make it complete up to the user interface. But I’m having trouble with attachments (again). Indeed, I don’t want to save the decoded email in the email database, but let the user decode it on the fly at each opening with his/her GnuPG password.

The need to decrypt messages on-the-fly like this adds complication, but is an important security feature. It ensures that decrypted messages aren’t available to others even if the user’s phone becomes compromised. But Damien must make quite significant changes in order to support this.

The email layout (after decryption) is changing in memory when it contains attachments while nothing is saved in the database. But nemo-qml-plugin-email expects to retrieve any email it is displaying (and particularly its attachments) from the email database. I’ve circumvent this for the body of the email, but I’ve no clean solution for attachments at the moment. So it’s a bit stalled for the moment.

And on the CLI side szopin also readily admits that there’s more work to be done.

All in all outside of base decryption there’s still a ton of work to be done even on the decrypting side. Even though sequoia is GPLv2 and the sq command works pretty much as a drop in replacement in the CLI, all the rest of Sailfish OS works with gpgme and sequoia has lower level API support only, so I doubt it will replace GPG officially any time soon.

If you’re interested in following Damien’s progress with this you can keep track on the Qt code review platform. But that’s not quite all, because Damien has also been quietly improving the overall QMF codebase independent of his GnuPG work.

When looking at the QMF code, I noticed that it’s still using QCop which is no longer supported in Qt and mainly replaced with D-Bus Qt implementation.

QCop is an inter-process communication (IPC) protocol that allows different parts of the system to communicate with one another. Many Sailfish OS developers will be familiar with D-Bus, which is the standard IPC mechanism used on Sailfish OS. If one application wants to trigger an action or access data that’s part of another application, it can make a D-Bus call to do so. QCop provides similar functionality, but is now a legacy Qt approach to this. As a result, Damien is intent on upgrading the QMF code to switch from QCop to D-Bus:

I’ve started to upgrade the code. Mainly to get the code up to date with today’s standards and hoping secretly for a wider adoption.

As you can see, Damien continues to work on many different aspects of the Sailfish OS messaging stack in the background, bringing both new features and important upgrades to the system. It’s nice to see the collaboration between szopin and Damien is producing results and hopefully we’ll see the fruits of their labour appearing in future Sailfish OS releases.

Repository roundup

Few activity this fortnight, mainly driven by community members. It is not reported in this digest, but looking at the exchange in the various pull requests, Jolla is still actively working on review tasks and still accepting the changes when ready.

Communication services

  • voicecall , the open source part of the calling application, neochapay proposed modifications to allow building it using Qt6.
  • nfcd , the daemon for near field communication, tehnick removed libdbusaccess from the link since it is not necessary and was creating an arbitrary dependency on this library.

Multimedia

Audio and video layer

Developper’s corner

App roundup

As always the Sailfish OS developer community has been continuing to work hard on the apps we all take for granted and I’m very happy to be able to report on some of the fruits of their labour here today.

Don’t forget that if you’re especially enthralled by a particular app, or even if it just makes your day a little bit nicer, you could do worse than make a donation to the project and announcing the fact on the Big Thank You and Coffee Thread.

First up is an app for managing your regularly updated spoken-word audio samples (otherwise known as podcasts). The gPodder app from Keeper-of-the-Keys offers a lovely interface to medium on your Sailfish device. I mentioned audio, but a particularly nice feature of the app is that it handles video nicely as well. You can either download the audio or video files to your device to use your regular Media app to listen to or view them, or you can do so directly within gPodder itself.

But let’s back up a bit. Because before you’re downloading anything you’ll need to find something you’re interested in. gPodder offers a range of different ways to subscribe to podcasts. If you already have the URL of a podcast, for example taken from the Web, then you can simply hand over the URL and let gPodder do the rest. But there’s also a nice ‘Discover new podcasts’ option that will allow you to search a range of providers. My experience with this feature was varied: some providers worked great, whereas others just left me with a Silica spinner.

Having found something to listen to or watch, the way of accessing episodes is both simple and provides suitable features. The list of episodes is nice, compact and easy to navigate, with information about each episode easily to hand. A particularly nice touch is that when playing a podcast you can choose the playback speed, from half normal speed all the way up to three times normal speed. It works well for speech, there are no chipmunks here, and I was happy to see it works well for both audio and video files once the initial stuttering had settled down.

The latest version 4.14.0 of gPodder adds this nice ability to play video, as well as improved support for Apple podcasts. It’s available from the Jolla Store and OpenRepos.

Next up we have Tooterβ from perennial app-improver Mark Washeim (poetaster). As the world is seemingly moving away from X/Twitter and on to other platforms, Tooter provides you with the means to move to Mastodon if you’re a Sailfish OS user. I’ve been using Tooter myself for some time now and it’s an effective way to interact with your chosen Mastodon server.

It’s also great to see that the latest release is the product of some collaboration between Mark and Ville Nummela (one of Jolla’s sailors). Ville converted the app to use the standard Sailfish Amber Web Authentication for the OAuth capabilities, allowing Mark’s effective but bespoke Python Web server to be retired. This should make maintenance easier in future. In this release we also see updates for file selections and various other small bug fixes. Great work! You can get this latest version 4.14.0 from the Jolla Store and Chum.

The next app for today isn’t one you’ll find in the Jolla Store, but as I can’t resist a great game, especially if it’s a retro classic, I couldn’t help but include it. The fheroes2 app from Kormil allows you to play classic PC game Heroes of Might and Magic II on your phone in all its pixelated glory.

I must have sunk so many hours into this game in the nineties that I immediately felt at home running it on my phone. It’s a turn-based strategy game that sees you roaming a 2D map for resources which you then use to upgrade your homestead and recruit an army. Unlike more recent world-building games you have only limited capacity to change the landscape: you can’t change the location of the castles for example, although you can take over any castle you’re strong enough to subdue. Eventually you’ll land your hero in a battle which involves moving your troops around a map of hexagonal tiles, using the various weapons and magic at your disposal based on the troops you’ve accumulated.

You’ll need the commercial game files to play the game, but don’t worry if you’re not the proud owner of the original CD box set, you can buy yourself a copy from GOG. Alternatively if you want to try-before-you-buy you can use the demo downloader script to download yourself a copy to your computer and then copy them over to the appropriate place on your phone. Something like this should do it:

mkdir temp
cd temp
./download_demo_version.sh .
scp -r data demo maps \
    defaultuser@192.168.2.15:~/.local/share/fheroes2

The latest version of the app includes a bunch of improvements, including better AI, a more complete map editor and over forty bugfixes. Take my advice and grab yourself a copy now from OpenRepos!

Finally today I wanted to highlight the work Olf (olf) has been doing on the FileCase app. FileCase is a venerable app providing access to the filesystem on your Sailfish OS device. Although Sailfish OS has a built in file manager, many users prefer the flexibility and configurability of a separate app, and FileCase is a classic. It’s been one of the mainstay apps on my phone for a while now and does the job nicely.

If you’ve not used the app before, a particularly nice feature is the fact that you can add remote services for browsing, to supplement access to the files on your local device. These include Box, Dropbox, Google Drive, OneDrive and WebDav. The last of these can be used, for example, as a means of accessing NextCloud servers.

Olf has made many changes recently, and while most of them are backend improvements, they’re important nevertheless. They include an improved translation pipeline, continuous integration for the repository, improved issue reporting. Plus bugfixes, cleaned-up code and a proper SailJail configuration. Version 0.4.2-RC1 of FileCase is available form OpenRepos.

Thanks once again to all the developers and contributors ensuring the Sailfish OS app ecosystem continues to provide such great apps for us users.

Please feed us your news

Hope you enjoyed reading this community newsletter! As always, please do not hesitate to share your ideas, thoughts, or suggestion for future newsletter topics.

Big thanks to everybody to make this newsletter to happen!

Please do also join us at our community meetings on IRC, Matrix and Telegram. Next community meeting will be on the 9th November.

28 Likes

Thank you for great update on promising progresses!

One remark on filecase: I observed that for older devices (in my case XA2 Ultra) the default pathes are shown empty, I guess the reason might be that defaultuser is hard coded in the app and legacy user nemo isn’t supported in this app.
That is a pity, since filecase looks really nice.

Great newsletter once again, thank you!

Also worth noting about Rust is that 1.72.1 already compiles (i486 only for now), and with, uh, force-installing it to SFDK build tooling I’ve been able to successfully compile Whisperfish with it (and bump a lot of dependencies up). Yesterday I actually got it launching in the emulator for the first time. Not ready for prime time quite yet, but they both are reaching a practical level of usability for sure!

Making newer Rust happen also required LLVM 14, which was also spearheaded by @rubdos - can’t recall if it was mentioned already in an earlier news post.

12 Likes

reminds me to submit my package for lld 14, which is oddly missing

3 Likes

Making newer Rust happen also required LLVM 14, which was also spearheaded by @rubdos

Indeed, @rubdos started working on LLVM upgrades since late september and his work was reported in : Sailfish Community News, 5 October, Camera2 progress

There are two opened merge requests at the moment to move LLVM to 15 or even 16 (with joined work from @rubdos and @direc85).

9 Likes

Thank you very much @olf for Filecase!! :star_struck:

3 Likes

Slightly offtopic … but @dcaliste do you know what’s missing for displaying meta information like “replied”, “forwarded” etc (?) and maybe if it would even be reachable to set those “flags” when replying from sailfish mail?

Good question. Quick answer: I’ve no idea. Longer answer after looking into the variaous repositories implied in the process:

  • QMF has flags for these status (Replied, RepliedAll and Forwarded), see QMailMessageMetaData class in src/libraries/qmfclient/qmailmessage.h,
  • nemo-qml-plugin-email has no such abstractions, for instance it’s missing from EmailMessageListModel class which is used to display email lists such as the Inbox for instance. Grepping for Replied gives no result so far.
  • jolla-email, I didn’t look at it closer, but since the QML layer is not exposing it, I don’t think there is anything about these flags.

So it first looks like, it’s just a matter of adding some roles in the message list model, attributes in the message class and add UI feedback based on these roles and attributes. But grepping for Replied in QMF code gives few results. It seems that only the IMAP plugin is setting this flag. Which makes sense : only the IMAP protocol is able to tell a client that some email has been replied elsewhere.

To conclude, two things are missing in my opinion:

  1. a way to expose the Replied, RepliedAll and Forwarded status to QML and in the UI,
  2. a way to set these flags from QML when replying or forwarding from within the email application.

So nothing very complicated, at first glance, but not done yet !

2 Likes

Sounds doable indeed! Thanks a lot for the overview, I’ll try my luck soonish!

2 Likes

Speaking of email - let me grab this opportunity to ping @dcaliste, maybe also @rainemak, to ask for the option to have multiple email identities for the same account:

Also mentioned earlier:

8 Likes

Yes, and please also add multiple real names to the From addresses!

2 Likes

While we are at it, displaying is one thing. And setting another. Not setting the “forwarded” flag is a showstopper here.
See:

Hey thanks for the shout-outs, that’s very much appreciated. :slight_smile: I’m not sure whether 1.73.1 will be done soon, since 1.72 is already that recent! We’re still waiting for some response from Jolla on how to get a hold of the cross-aarch64-glibc* packages.

Also many thanks go to @direc85 for providing me with a remote Ryzen 5xxx machine to build those things on, because my Threadripper has been notoriously unstable the past year :frowning:

3 Likes

See FileCase issue #15: It is all @flypig’s fault. :wink:
More seriously: IIRC, in spring 2022 he transferred the formerly hardcoded user home directory to a variable, which is read from FileCase’s configuration file, and altered the homedir from /home/nemo to /home/defaultuser, because that suits most people better, nowadays. By this measure, one can easily set the homedir (called “Phone Memory” path in the GUI) in a single location, the aforementioned config file: This was a big step forward!

What is missing, is a GUI dialogue to switch the homedir. PRs are welcome!

How to alter the default homedir manually, which can be carried out with FileCase, is also described in detail in FileCase issue #15.

P.S.: @rainemak, thank you very much for featuring FileCase. NB: Well, trivially bailing out of SailJail is not really what I would call “a proper SailJail configuration”; PRs for a really proper SailJail configuration are very welcome. The same applies to fixing FileCase issue #4 (updating FileCase to use the current DropBox API) and checking plus documenting in a GitHub issue if the other web-storage options still work well: Box, Google Drive, OneDrive, WebDAV (used by e.g. OwnCloud / NextCloud)

P.S. / edit (2023-11-05): @simonschmeisser provided an easy to use and likely better, automatic solution by FileCase PR #14. Thanks!

4 Likes

BTW, if someone wants FlowPlayer, the other well respected app form Matias Perez (CepiPerez) to be resurrected, I prepared all infrastructure aspects, but hesitated to address the required migration from gstreamer / libgst to gstreamer1.0 / libgst1.0 due to lack of time.

Besides source code improvements, translation updates for both, FileCase and FlowPlayer are very welcome, too!

1 Like

I was thinking of doing that, but can’t seem to get access to your FileCase transifex. Following your link gets me an out logged info page and from there, nothing seem to work.

@eson, all is fine: You requested a translators role for FileCase, which I approved now, and also I sent you an invitation for FlowPlayer. For me Transifex’s role handling seems to work as always.

I never realised which domain you are using: SvenskaSprakFiler.se, cool!

2 Likes

Yes, now I’m in, thanks. The transifex confirmation dialog at the translators side is terrible/non-existent. I never got to know if I’ve even sent my request.
I’ve actively used that domain since 2011. :wink:

2 Likes

I also use TX for almost that long. Relatively good experience. Did you recheck your settings for sending emails?

Yes, I do get emails when something finally happens.