briar-gtk flatpak on librm5_devkit
here the (admitteldy hacky) steps to reproduce getting briar-gtk alpha flatpak to work on librm5_devkit aarch64
patched briar headless
cloned briar repo applied two patches:
+++ b/bramble-core/src/main/java/org/briarproject/bramble/plugin/tor/TorPlugin.java
@@ -192,7 +192,7 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
// Load the settings
settings = callback.getSettings();
// Install or update the assets if necessary
- if (!assetsAreUpToDate()) installAssets();
+ //if (!assetsAreUpToDate()) installAssets();
if (cookieFile.exists() && !cookieFile.delete())
LOG.warning("Old auth cookie not deleted");
// Start a new Tor process
+++ b/bramble-java/src/main/java/org/briarproject/bramble/plugin/tor/UnixTorPluginFactory.java
@@ -82,13 +82,13 @@ public class UnixTorPluginFactory implements DuplexPluginFactory {
@Override
public DuplexPlugin createPlugin(PluginCallback callback) {
// Check that we have a Tor binary for this architecture
- String architecture = null;
- if (isLinux()) {
- String arch = System.getProperty("os.arch");
- if (arch.equals("amd64")) {
- architecture = "linux-x86_64";
- }
- }
+ String architecture = "linux-aarch64";
+ //if (isLinux()) {
+ // String arch = System.getProperty("os.arch");
+ // if (arch.equals("amd64")) {
+ // architecture = "linux-x86_64";
+ // }
+ //}
if (architecture == null) {
LOG.info("Tor is not supported on this architecture");
return null;
compiled briar-headless as also described in http://4g375hpowkjyopwa7c5lm7f4ovzhceezvscm342uklflfpl3mcxxhxyd.onion/briar_headless_on_librem5_devkit.html
briar-gtk build flatpak
git cloned:
https://code.briarproject.org/briar/briar-gtk
git submodule update --init
built flatpak as advertised via:
flatpak-builder --install-deps-from=flathub --user --install --force-clean --ccache flatpak-builddir app.briar.gtk.json
run shell in flatpak container
flatpak run --command=sh app.briar.gtk
first replacing briar headless with the patched version for aarch64
cp /home/purism/dl/briar/briar-headless/build/libs/briar-headless.jar /home/purism/.local/share/flatpak/app/app.briar.gtk/aarch64/master/active/files/briar/briar-headless.jar
starting briar headless inside the flatpak
java -jar /app/briar/briar-headless.jar
which complains about the not visible (from flatpak perspective) distro tor dependencies. so copy dependencies into flatpak as well:
libevent-2.1.so.6:
cp /usr/lib/aarch64-linux-gnu/libevent-2.1.so.6.0.2 /home/purism/.local/share/flatpak/runtime/org.gnome.Platform/aarch64/3.36/active/files/lib/aarch64-linux-gnu/libevent-2.1.so.6
libzstd.so.1:
cp /usr/lib/aarch64-linux-gnu/libzstd.so.1.3.8 /home/purism/.local/share/flatpak/runtime/org.gnome.Platform/aarch64/3.36/active/files/lib/aarch64-linux-gnu/libzstd.so.1
with that briar-headless runs fine.
briar-gtk python key error
python key error, so I disabled the two lines of code:
remove/comment-out lines 30 and 31 of /home/purism/.local/share/flatpak/app/app.briar.gtk/aarch64/master/active/files/lib/python3.7/site-packages/briar_wrapper/models/contacts.py